VCL style mac look style designer - delphi

Recently I've been doing some research in to VCL Styling (Embarcadero XE2 for Delphi).
I can load and set the styles so that works fine.
Currently I'm exploring the VCL Style Designer and what I try to figure out is how can I move the minimize, maximize, resize, close and help button to the left instead of the current default right while the application text (caption of the form) is on the right.
I am at my whits end and hope some one can give me some pointers.
So basically what I try to 'emulate' is the Mac look on a Windows form.
Any help is welcome.

What do you want accomplish is not related to the VCL Style Designer, instead you must create a custom form style hook.
Follow these steps.
Create (and register) a new form style hook descending from the TFormStyleHook class.
Override the PaintNC method to draw the title buttons in the new positions.
Handle the WM_NCMOUSEMOVE, WM_NCLBUTTONDOWN and WM_WM_NCLBUTTONUP messages to detect the status of the title buttons (hot, pressed) and fire the actions (close, restore, maximize, minimize).

Related

Delphi XE5 Android TButton colors

I need change color of 50 buttons in one form.
Every button another color and color want to set by code(no design editor).
It is firemonkey mobile application.
By my opinion, without making your own button that doesn't use FMX styles completely (which would break multiplatform compatibility if you are looking forward to support multiple platforms with their native styles), you may apply some filter on top of each of those buttons but on some styles this may cause the text not to be visible, implementing your own filter might get you the desired result:
Effect:=TFillRGBEffect.Create(Self);
Effect.Color:=$80FF0000;
Effect.Parent:=SomeButton;
Another way would be to take advantage of TColorButton with TText on top of it, but this way the entire button won't be filled with your color, but you can modify default/custom style for each platform in order to get what you need (this indeed needs to be done in the designer but you would have to create just one style for each platform you need to support and not 50 for each button):
Button:=TColorButton.Create(Self);
Button.Color:=$80FF0000;
Text:=TText.Create(Button);
Text.Parent:=Button;
Text.Align:=TAlignLayout.alClient;
Text.Text:='Hello';
Text.HitTest:=false;
Button.ClipChildren:=true;
Button.Parent:=Self;

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.

Delphi XE2 modern looking MainMenu

I am trying to modernize the look of our older Delphi 7 application now that we are using Delphi XE-2. I experimented with the TRibbon, and although I like it, it probably is not the correct solution since we currently use a TMainMenu and make many runtime changes to it - our users can modify the main menu. But the default Mainmenu looks old, especially compared to the image shown.
What I am trying to do is something very close to the attached image, especially with the background color, but I don't quite understand how this was done. Can anyone tell me if this example (the File/View/Insert section) uses a TMainMenu, or is it Buttons on a Toolbar ? If we require a customizable main menu, do you think the example shown is an option ?
This example image comes from DevExpress Print Sample library.
Edit : I am new here so I can't include the image. Here is the link :
http://www.devexpress.com/Products/VCL/ExPrintingSystem/gallery.xml
The second image, the green one that says "Print Preview".
You could use the TActionMainMenuBar but the simpler solution for you is to Use Vcl styles, pick a theme, modify the graphical properties of a MainMenu component and then use StyleHooks to force the style just for the MainMenu component without using it for the whole application.

How to display tooltip or hint similar to Delphi XE tooltip code insight

I'm looking at wanting to implement a tooltip similar to the way Delphi XE does when you're debugging and you hover over an object. ie, it opens up a hint window with + signs which you can expand etc.
I'm trying to create a hint window which will show a list of items (for example) when hovering over a control (such as a button) which will let the user click on an item and I can then do something based on the item they've selected.
Are there any components out there that might do that already? Or am I better of just creating a borderless form and handle the showing/hiding myself with mouse events?
Thanks
Jason
I know there are hint components with embedded html. So you can have a kind of html treeview inside you hint!
I think it is a solution for you.
HTMLHint from TMS Software
THintBox from Cramon Utilities (freeware!)

Create a Ribbon Control in Delphi with Combobox as one of the control?

I am a newbie to using Delphi 2010 to write Ribbon Control...
I wanted a comboBox control with 5 to 6 lines for user to choose from on my ribbon...
I've set the CommandStyle of the TActionClient to csCombobox and I had a hard time figuring out how to set the content of my comboxbox and also the control seem to be disabled once I set the CommandStyle from csButton to csCombobox.
Please help.
I've never used the Ribbon before, but i made a little test and this is wath i get, I don't know if this is wath you want:
alt text http://img2.imageshack.us/img2/6885/ribboncombo.png
Just add strings to the Items property

Resources