Changing Delphi XE5 workspace to Delphi 7 - delphi

Is it possible to change XE5's workspace to Delphi 7 like? Designing Forms inside a window is really pain and i would like to move components palette to up and design form outside of a canvas.

You can switch to the Classic Undocked desktop in the desktop drop down. It's not identical to Delphi 7, but it is possibly as close as you'll get out of the box.
The other thing you can try is to enable the floating designer, disabled by default. More details here: http://francois-piette.blogspot.co.uk/2013/04/enabling-floating-form-designer-in.html
You'll need to adapt the registry key to your version. The article has the key for XE4. For XE5 it is:
HKEY_CURRENT_USER\Software\Embarcadero\BDS\12.0\Form Design
Set the Embedded Designer value to False. Restart your IDE and you've now got a familiar floating design surface.

Related

Delphi Toolbar Style Changed

I just upgraded from Delphi 2009 to Delphi XE8. Doing so has changed the appearance of the buttons on the toolbar of my program.
When compiled with Delphi 2009, it looked like this:
But now with Delphi XE8, it looks like this:
It seems to me that this is related to the Down property. If a Down property of a button is true, then its background will be blue. If I click on the button then that will change the Down property to false and the button will lose the blue background.
Does anyone know what might be causing the blue background and how I can eliminate it?
I am on Windows 8.1.
Followup: David's answer that this is the default display for Windows 8.1 is correct. Checking other programs, I see they do this as well.
I wasn't expecting this to be the default because my program compiled with Delphi 2009 didn't do this. But as David also explained, that's because Delphi 2009 did not have built in theme support, but Delphi XE8 does. (It may have been added in Delphi XE2, but don't quote me on that)
David's mentioned the manifest as a possible cause. It wasn't in this case, but he alerted me that I may have multiple manifests and should check for it.
So the final answer to my question is that I don't want to eliminate the blue background. It is the Windows 8.1 default way of displaying Down buttons, and I want to display the native theme by my program.
Your D2009 program is not themed, but your XE8 program is themed. By that I mean that the XE8 includes an application manifest that specifies version 6 of comctl32. Your D2009 program does not include a manifest, or does not include that part of the manifest which requests comctl32 version 6.
The visual appearance of the XE8 program is the native platform appearance, and on the face of it, it would be normal to follow the platform's lead. So the option that I would opt for is to leave the appearance as the platform standard. That is go with the XE8 version.
However, to answer your question, you can revert to the old appearance by removing the comctl32 v6 part of the manifest. This will affect other parts of your program too. If you only want to disable themes for the toolbar, that can be achieved with SetWindowTheme.

How to patch TSpinEdit to use Vista/Win7 visual style?

Win7 must give ok style for TSpinEdit, but I see outdated style:
So arrows are not themed, and buttons are old.
I use Delphi7. How to patch VCL to fix style?
OK is:
I don't know if Delphi 7 already had it but you can use TEdit in combination with TUpDown and then set the Association property of the TUpDown to your TEdit.
TSpinEdit is a custom VCL control. There is no Windows control with that functionality. Even in the latest version of Delphi it looks exactly the same as in Delphi 7. And it's really rather ugly isn't it?
The control, in modern Delphi, is implemented in a unit named Vcl.Samples.Spin. Looking at the documentation for the Vcl.Samples namespace we have:
Contains the units for several sample VCL components delivered with RAD Studio - a calendar, an outline, a gauge, and a spinbutton.
The unit will be named differently in Delphi 7, but the principle is the same. These are sample controls, supplied with source code.
So, what you may do is take a copy of the TSpinEdit code, and modify the painting. Change the button drawing to be how you wish it to be.

Form/Button/other component styles

Ok, so I downloaded a .zip file of all different kinds of examples from embarcadero... the way the buttons look and among other things are completely different from when I just create an application within my Delphi 7. I believe these examples were made for or made at a new time... because the button look way different from the way the button when I put them on my application. the buttons from the example look very modern and sleek and have mouse over effects (This applies for all the examples..its not a custom component ) I was wondering I can get this effect in my own applications within Delphi 7.. I can do this by opening one of the examples and just erasing all the code... but that's not what im trying to do..im wondering how I can accomplish these styles.. how come the examples have these nice looking buttons and such..but when I make an app within D7 its much older looking and such..
I apologize if my question is hard to understand.. and I appreciate any help on this.
Thank you in advance.. I appreciate it.
If I understand your question correctly, you're asking about the native control appearance changes that were added by the addition of Windows Themes in Windows XP.
Delphi 7 supported themes by use of the XPManifest component, which does nothing but add a manifest to your application which tells Windows your app is theme-aware and therefore it should load a more recent version of the common controls library. You can find the XPManifest component in the VCL component palette on the Win32 tab, or simply add the XPMan.pas unit to your uses clause. Note that the themed drawing does not work for all controls (grids, for instance, are not drawn using themes, and IIRC neither is TSpeedButton - it's been a long time since I used D7, so I'm not sure exactly what is and isn't supported, but the support is limited).
Starting with Delphi 2007, there is built-in support for Windows Themes, which is available by default in new projects. It can also be enabled in older projects using a checkbox in the Project->Options->Application dialog.
(Of course the real answer is that if you want your app to have the features included in modern versions of Windows, you should upgrade from your Windows-95 era version of Delphi to one that is more recent.)

How do I do Drag and Dock like the Delphi IDE with pins and tabs?

I would like to make Drag and Dock work as well in my applications as it does in the Delphi IDE (i.e. being able to drag around the Object Inspector / Structure View and Dock them at suitable sites). I've had pretty good success with docking forms into a PageControl, but was wondering if anyone knows how to get it to work with the the little close buttons and pins and so on.
I'd also be interested to know what components the Delphi IDE uses to achieve this.
The reason for my question is I want to make much more advanced videos on how to do this, the two that I have done previously are here and here.
You can use JVCL JvDocking components to drag and dock, in almost any version of Delphi. It's free and open source. The style with pins and close buttons is available using a docking style called the VID (visual interdev) style, that comes with JvDocking.
There are already a bunch of commercial alternatives also, and there is some support built into Delphi, which I find insufficient for my needs. While the Delphi IDE has its own internal docking library, tab support is very limited, slow, and in my subjective opinion, broken.
However, even on ancient delphi versions, Delphi 7 and up, JvDocking, provides all the functionality that the VCL's docking provides, plus more, so there's no problem ignoring the built in VCL functionality, which is to docking as TStringGrid is to real Grids.
Steps with JvDocking:
Drop dock server and dock style object on main (host form) and connect them.
Drop dock client component on the client (form to be docked) and connect it to the dockstyle.
Configure properties of dock server.
Run app. Have it create a form. Now drag the client form to an area that is made dockable by the dock server. Watch it dock nicely.
For docking in code demos see the JvDocking demos in the JVCL Examples folder.
Update
Or you can use what is built into the Delphi VCL since XE and XE2. XE and XE2 include a docking demo project named dockex.dpr.
On Win7/Vista the demo is located at:
C:\Users\Public\Documents\RAD Studio\9.0\Samples\Delphi\VCL\Docking
Look here for the demo on Win XP:
C:\Documents and Settings\All Users\Documents\RAD Studio\9.0\Samples\Delphi\VCL\Docking
You should also check out the documentation for TDockTabSet in the VCL, and the EDN article linked in the comments, which has source code you can download here. In my humble opinion, the Jedi JvDocking stuff is more professional and slick than the Docking Demo that ships with Delphi, but the built in stuff has the advantage of working without installing anything additional. I just tried the DockTabSet demo and the built in docking demos, and they are slow, and the painting is ugly and flickers. JvDocking looks professional. It's your call.

How to temporarily turn off "snap-to" (anything) in Delphi IDE /visual designer (D2007)

Every once in a while this drives me crazy: I want to move a control to some precise location, WITHOUT any kind of "snapping" -- snap-to-grid, snap-to-guidelines, snap-to-border, etc... and Delphi won't let me. Is there a key combination that one can use while dragging to temporarily turn off any and all "snapping"? I seem to recall it being available in D6, but can't for the life of me find a similar combination in D2007, short of going into Tools -> Options, etc... (which kind of defeats the purpose).
Drag with the Alt key down to disable snapping to the grid. Snapping to objects will remain in effect. You can use Ctrl with the arrow keys to move one pixel at a time. You can also type the desired coordinates into the Object Inspector.
In Delphi 2009 CodeGear has changed the behavior of ALT+Move to also disable the designer guide lines. But in Delphi 2007 this feature can't be turned off without an external tool.
On of those tools (and I think the only that can do this) is the DDevExtensions 1.6 IDE plugin that adds this ability to ALT+Move for Delphi 2007.

Resources