vcl-styles

How to apply a vcl style hook to a particular component of a form?

廉价感情. 提交于 2019-12-22 10:24:02
问题 I'm using the vcl style hook of the answer to this question close button of a tabsheet not supporting vcl styles and is working fine, but the close button is draw in all the TPageControl components of my app. And I want add this option (draw the close button) to only a particular form. The question is : how I can apply this hook or any vcl style hook just to the TPageControl of a specific form? 回答1: You can use a interposer class for the TPageControl component check this sample type

TActionMainMenuBar, VCL-Styles and MDI buttons(Minimize, Close etc) not being styled.

血红的双手。 提交于 2019-12-21 04:39:19
问题 I'm trying to make TActionMainMenuBar display styled MDI buttons like a TMainMenu does. Any suggestions? I can't stop using MDI for this project. 回答1: Ok, first this is not a Vcl Styles bug , this is a VCL bug. This issue appears even if the Vcl Styles Are disabled. The issue is located in the TCustomMDIMenuButton.Paint method which uses the old DrawFrameControl WinAPi method to draw the caption buttons. procedure TCustomMDIMenuButton.Paint; begin DrawFrameControl(Canvas.Handle, ClientRect,

Is there any Delphi XE2 styles gallery?

狂风中的少年 提交于 2019-12-20 09:55:51
问题 In XE2 there is a new function : 'styles', for VCL( .vsf) and Firemonkey ( .styles), and some are provided in C:\Program Files\Embarcadero\RAD Studio\9.0\Redist\styles directory. As it seems to be easy to create a new style, is there any 'styles Gallery' Web site or blog somewhere ? 回答1: No, for the moment there is no such thing like a gallery of styles for FireMonkey or VCL styles. But if you want to create you own try these entries in my blog which show an easy way to create/modify new VCL

How to color the background of a TComboBox with VCL styles enabled

心已入冬 提交于 2019-12-20 04:53:43
问题 I am trying to color the background of a TComboBox with VCL styles enabled like the way its described in this article but its not working. http://theroadtodelphi.wordpress.com/2012/02/06/changing-the-color-of-edit-controls-with-vcl-styles-enabled/ 回答1: Depending of your Delphi version you must Delphi XE2 For Delphi XE2 you must write a Style Hook uses Vcl.Styles, Vcl.Themes; type TComboBoxStyleHookExt= class(TComboBoxStyleHook) procedure UpdateColors; strict protected procedure WndProc(var

How to color the background of a TComboBox with VCL styles enabled

混江龙づ霸主 提交于 2019-12-20 04:53:12
问题 I am trying to color the background of a TComboBox with VCL styles enabled like the way its described in this article but its not working. http://theroadtodelphi.wordpress.com/2012/02/06/changing-the-color-of-edit-controls-with-vcl-styles-enabled/ 回答1: Depending of your Delphi version you must Delphi XE2 For Delphi XE2 you must write a Style Hook uses Vcl.Styles, Vcl.Themes; type TComboBoxStyleHookExt= class(TComboBoxStyleHook) procedure UpdateColors; strict protected procedure WndProc(var

VCL Style from DLL is affecting TMenuItem in Application

五迷三道 提交于 2019-12-19 17:47:54
问题 I am using Delphi XE6 and VCL styles. I have main application and dlls. My main application has enabled runtime themes and I am using vcl style files. I did quite similar thing to my DLLs. I enabled runtime themes and added VCL.Themes, VCL.Styles under uses and resource file with VCL style file within it. When DLL is loaded I load VCL style from resources and set it for DLL gui. Main app and DLL are not built with runtime packages. Now I have main app GUI styled with own style and DLL gui

Program icon looks curious in the title bar when using a VCL style

我们两清 提交于 2019-12-19 06:26:21
问题 Using Delphi XE7 on a Windows 7 Pro 64-bit system. If I choose 'Charcoal Dark Slate' VCL style, the 16x16 pixel titel bar icon down-sized from the 32x32 program icon looks not like expected. It should look like the small icon below. If I load the program icon in 16x16 pixel format, it looks good in the titel bar, but ugly in the task bar because of the 16 to 32 pixel enlargement. 回答1: This is known issue with VCL Styles http://qc.embarcadero.com/wc/qcmain.aspx?d=106224 Also see this issue in

Property “ofOverwritePrompt” for TSaveDialog does not work when VCL Styles are used in Delphi 10.1 Berlin

[亡魂溺海] 提交于 2019-12-19 05:53:05
问题 Create a new VCL Forms application On the main form add a Tbutton and a TSaveDialog Set "ofOverwritePrompt" to True in properties for the SaveDialog1 Use: procedure TForm1.Button1Click(Sender: TObject); begin SaveDialog1.Execute(); end; Run the app. Press the button to execute the save dialog. Try to save to a file that already exists. A message box appears if you want to replace the file. Press cancel. All fine so far. Close the app. Go to Project/Options/Application/Appearance and select a

What can I do about maximized, styled windows, which show their borders on adjacent monitors?

馋奶兔 提交于 2019-12-18 11:47:14
问题 On a multi-monitor system, a "blank" VCL application maximizes fine, but the same application with styles enabled (and one chosen as default) maximizes incorrectly. What I'm seeing is the right-hand edge of the window extend onto the 2nd monitor (my main is on the left). When I started comparing to other Windows apps, I noticed that under Windows 7 (at least), maximized windows do not even have non-client borders on the left, right or bottom sides. And indeed, the standard VCL (non-styled)

Delphi VCL styles tutorial - how to change the style at runtime

我与影子孤独终老i 提交于 2019-12-17 07:25:54
问题 Is there a good VCL Styles tutorial where we see how to dynamically (in run time) load/change the style ? This should work with Delphi XE2 and up, since XE2 is the first version with VCL Styles. 回答1: I'm adding an answer because local information is often preferred to just links. Here's the key facts you need to know before you start: Many VCL controls have color properties, but those properties are going to get ignored when styles are on, and the default "common controls" like Button are