PeterPanettone 157 Posted July 11 (edited) In Delphi 12.1 Form Designer you can show the DFM code in the Code Editor with the shortcut ALT+F12. Where is the menu command for this action? Wasn't the View menu supposed to show the menu item 'View as Text' for this command? There is none: Edited July 11 by PeterPanettone Share this post Link to post
Uwe Raabe 1979 Posted July 11 AFAIK, this command is only available from the context menu of the form designer. Share this post Link to post
PeterPanettone 157 Posted July 11 (edited) 19 minutes ago, Uwe Raabe said: AFAIK, this command is only available from the context menu of the form designer. Unfortunately, the shortcut ALT+F12 is missing from the context menu! Isn't displaying existing shortcuts a requirement for a consistent UI? Edited July 11 by PeterPanettone Share this post Link to post
Brian Evans 100 Posted July 11 Another issue is IDE insight is blind to context menu commands. This means things only available in a context menu are harder to find. Share this post Link to post
PeterPanettone 157 Posted July 11 (edited) 41 minutes ago, Die Holländer said: Right-Click on the form caption bar. In my Delphi (12.1) the context menu is shown from the whole form (not only from the caption bar) - but not from the Form Designer canvas. Which is logically inconsistent because the Code Editor showing the DFM code shows the code of the whole form and and not specifically the code of the clicked object (which BTW would be an interesting option). Edited July 11 by PeterPanettone Share this post Link to post
PeterPanettone 157 Posted July 11 (edited) 23 minutes ago, PeterPanettone said: which BTW would be an interesting option In complex forms with many (nested) objects, displaying only the DFM object code for the selected object would be a helpful option. It could help the user focus on that object when editing its code in the Code Editor. What do you think about this? Edited July 11 by PeterPanettone Share this post Link to post
Die Holländer 33 Posted July 11 (edited) 2 hours ago, PeterPanettone said: In my Delphi (12.1) the context menu is shown from the whole form (not only from the caption bar) - but not from the Form Designer canvas. Yes, indeed, but right-click on the form name shows only "View as Form", while the display doesn't show the text of the form (*.dfm) at the moment. It appears that this is a Toggle option and by selecting this option the display will switch to Text view... The "View as Form" in the menu is just not displaying what it is going to do. Same for Alt+F12 is toggle between Text and Form view.. (in Delphi 11.3) Edited July 11 by Die Holländer Share this post Link to post
Pat Foley 51 Posted July 11 I usually use notepad++ when touching the dfms as text. But for viewing you could do the following. Select desired nest in design and copy. Open new Vcl form. Paste selected controls on edit form Adjust controls Paste adjusted controls back to source design window. Make new unit an inline or embedded frame to reduce nesting in source form? Lazarus leaves the text view up once viewed as text but not really useful most of the time. Share this post Link to post