Delphi XE Form and Source in dual monitor - delphi

Somoene knows if i can setup my IDE for display source code in one monitor and frm in another? I talk about the same .pas because 2 different .pas i can view in each monitor.

Not sure about XE, but in 2007 you can go to Tools->Options to bring up the options dialog, then uncheck "Embedded Designer" under VCL Designer.
After restarting the IDE, the form design will be in an undocked (and undockable) window. The code editor will then be detached from the form, so can be moved to another monitor.
However:
If you move the form around, the forms default position (Left and top) will change, and may move off the default monitor if you use Form.Position := poDesigned. That's the main reason I prefer the embedded designer.
Edit
Note as well that all of the docked windows (object inspector, watches, project manager etc) can easily be undocked as well, then docked again.

You can open multiple edit views of the same module (right-click in source code editor, select "New Edit Window" from the context menu).

If you mean the source code (.pas) on one monitor and the visual designer (form) in another, use the Desktop Speedsetting in the IDE's toolbar, and set it to "Classic Undocked". Arrange the IDE the way you like between monitors, and then click the "Save Desktop" button next to the SpeedSetting dropdown. Name the layout you like, and then save it as your default desktop. Also see #ldsandon's comment about needing to uncheck the embedded designer in the IDE's options dialog as well.
I personally prefer the newer embedded designer layout (the default), and put the IDE on the secondary monitor with the application running in the primary one. You can then step through code in the debugger and view the output on the primary monitor at the same time.

Related

Is it possible to have the Design/Form window open while the Code/Unit window is open? [duplicate]

I program in Delphi 2010, and I have enough screen space to show both a form and its code (that is, the code and design tabs of a form) at the same time, but so far I haven't had any luck trying to make that happen. Is there a way to customize the IDE to show both at the same time?
Set your desktop to "Classic Undocked"
Then you need to uncheck the embedded designer option in the VCL Designer options page:
You'll also have to restart the IDE for those changes to take effect.
The option Andreas is talking about is located under Tools | Options | Environment options | VCL Designer. It is called Embedded designer.
When you uncheck that a form will be displayed free-floating at its designed position instead of embedded in the docked editor. You need to restart the IDE for the option to take effect.
To show both form and code you will have to change your layout and/or move the form to a position where it doesn't cover the code editor.
As an alternative you could opt for the classic undocked layout. That way you can certainly position form and code editor not to overlap. To activate that you need View | Desktops | Classic Undocked.
Note: be aware that the position of the form at designtime is reflected at run-time if you have a form's Position property set to poDesigned.
Cool hack for Delphi XE4-XE7:
Changing 'HKEY_CURRENT_USER\Software\Embarcadero\BDS\11.0\Form Design\Embedded Designer' to FALSE will bring the classic designed back.

How to restore/clear form position after multi-monitor setup change

Within the IDE, when F12 toggles between code and form,
the forms are displayed outside the monitor borders,
and therefore not visible.
This happens after a multi monitor setup has changed,
and the forms no longer open within the available new monitor screen areas.
One way to resolve this is to use the property inspector and
set the Top/Left properties to 4 to make the forms visible.
This is however a lot of work,
especially if many forms and possibly many projects are involved.
Is there a better way to reset the form locations once and for all,
so they are all visible with the new monitor setup?
There is nothing (AFAIK) in Delphi 6 IDE that would help. But assuming you are using Windows, the help is near, (tested on Windows 7):
Right-click on taskbar and select 'Cascade windows', this affects all windows in one go.
or
Alt-Tab to the window, press Alt-Space and then M (for move). Move the window with the arrow keys. This you would have to do seperately for each window.
Close your Delphi IDE. Then, if your current project group file is xyz.groupproj, open the file xyz.dsk with an text editor. Look for section [UndockedDesigner] entry "Count" and change its value to zero.
[UndockedDesigner]
Count=0
That will force all design window positions to 0,0 on your main monitor.

Firemonkey Cut of controls using D XE2

I want to redesign an GUI made with the Fire Monkey Framework using DELPHI XE 2.
I placed a second panel on my GUI designer and want to move components / controls inside this panel.
I failed to use function to cut the components and I can not place them inside the panel with .
Is ths way of moving componetens different between VCL and FM ? I did this job many times in my VCL applications
There is a bug in the XE2 IDE which intermittently disables cut/copy/paste from Edit menu.
If you switch between Welcome Page tab and back to the form's tab in IDE, it should temporarily fix the issue and restore cut/copy/paste.
In addition to Marcus` answer, with FMX (at least the version included in XE5) the easiest way is to just use the Structure View window; it's easiest just to left-click and drag the control from one parent to another, and the form is updated to show the new layout automatically:
Dropping two panels, arranging side by side, and dropping a label on the left panel:
Dragging the label (via the Structure View) from Panel1 to Panel2:

put designer window in background

This is annoying ... In Delphi 7 when you clicked on the code window the form would automatically hide. Now it stays on top. I have to minimize it to remove it from focus. Are there any settings that correct this behaviour ? Also I must play hide and seek with component pallete on the right. I have it open but soon as I try and click on the scroll bar to try and search for my components I get everything replaced by Delphi projects etc. Then I must click inside the form for the component pallete to come back again. Annoying... Any way to disable this ?
For the first part of your question you can disable the embedded designer in order which the switch between the form and the code will be like the Delphi 7 IDE.
Tools-> Options -> Environment Options -> Vcl Designer -> Embedded designer (uncheck)
Also you can take a look to the Simon Stuart plugin RADSplit
Now for the component palette part, this windows change depending of the current active form , so if you active window is the form designer the Tool palette show the components else show the Delphi projects menu. Anyway Delphi XE2 includes the classic palette component which always show the components in top toolbar even if you are in the source code view.

How can I get Delphi 2010 IDE to show a split view with a form and its code at the same time?

I program in Delphi 2010, and I have enough screen space to show both a form and its code (that is, the code and design tabs of a form) at the same time, but so far I haven't had any luck trying to make that happen. Is there a way to customize the IDE to show both at the same time?
Set your desktop to "Classic Undocked"
Then you need to uncheck the embedded designer option in the VCL Designer options page:
You'll also have to restart the IDE for those changes to take effect.
The option Andreas is talking about is located under Tools | Options | Environment options | VCL Designer. It is called Embedded designer.
When you uncheck that a form will be displayed free-floating at its designed position instead of embedded in the docked editor. You need to restart the IDE for the option to take effect.
To show both form and code you will have to change your layout and/or move the form to a position where it doesn't cover the code editor.
As an alternative you could opt for the classic undocked layout. That way you can certainly position form and code editor not to overlap. To activate that you need View | Desktops | Classic Undocked.
Note: be aware that the position of the form at designtime is reflected at run-time if you have a form's Position property set to poDesigned.
Cool hack for Delphi XE4-XE7:
Changing 'HKEY_CURRENT_USER\Software\Embarcadero\BDS\11.0\Form Design\Embedded Designer' to FALSE will bring the classic designed back.

Resources