vcl-styles

Delphi 10 Seattle - Vista Dialogs bug with VCL Styles

这一生的挚爱 提交于 2019-12-10 11:26:11
问题 I've ran into a problem with "Vista Dialogs" in "Delphi 10 Seattle" yesterday. It seems to not work well with some VCL Styles. This bug occured while using "Windows 10 Dark" as default style in my app. So my immediate thought was that Vista Dialogs does not work with Custom VCL Styles, but when using "Windows" as a default style and using Windows 10 as OS the dialog works fine. I've uploaded two pictures, one with the style applied showing the visual bug and one without it, working just fine.

Right to left ComboBox in Delphi XE2 with styles

萝らか妹 提交于 2019-12-10 11:04:23
问题 I have problems when I use ComboBox in Delphi XE2 with Custom styles(Emerald Light Slate) and this property: BiDiMode := bdRightToLeft; Style := csDropDownList; That ComboBox without Custom style: And with Custom styles(Emerald Light Slate): How i can fix it? 回答1: The issue it seems located in the DrawItem method of the TComboBoxStyleHook (the vcl style hook of the TComboBox), you can fix this overriding this method. Try this sample code (this solution is far from being perfect but is a start

Get a specific glyph from Delphi VCL Style

时光总嘲笑我的痴心妄想 提交于 2019-12-10 10:34:00
问题 I want to get at a specific bitmap from a VCL style - and set it as an image on a button - it is actually the help question mark. In the Bitmap Style Editor is is the btnHelp image, from the Form. 回答1: To get a Visual element (glyph) from a VCL Style you must use the GetElementDetails and the TCustomStyleServices.DrawElement procedure. Try this sample uses Vcl.Themes; {$R *.dfm} procedure TForm1.PaintBox1Paint(Sender: TObject); var LDetails : TThemedElementDetails; begin //Get the detailsfor

Delphi XE2 VCL styles, remove a style or disable a class skinning from a TLabel

孤者浪人 提交于 2019-12-10 09:41:20
问题 Using XE2 VCL styles, I'd like to disable the skinning for TLabel (or property sfTextLabelNormal) I've tried all kind of solutions from other questions, like using Engine.UnRegisterStyleHook, but it has no effect. 回答1: The TLabel component doesn't use styles hooks because is not a TWinControl descendant, so you can't use the UnRegisterStyleHook function. Instead you must override the Paint DoDrawText method. UPDATE Here you have a sample of how override the paint process of a TLabel. /

How to change color of the scrollbar in SynMemo with VCL styles

时光总嘲笑我的痴心妄想 提交于 2019-12-10 09:25:41
问题 there. I changed style of standard objects with VCl-theme. I use Color, Font and Gutter properties to change style of SynMemo. But I don't know, how change style of ScrollBar of SynEdit( apply vcl-theme ). Who can help me ? 回答1: To add styling support for the TSynEdit you must register a style hook for such control. Try using the TScrollingStyleHook style hook. Like so TStyleManager.Engine.RegisterStyleHook(TCustomSynEdit, TScrollingStyleHook); 来源: https://stackoverflow.com/questions/41728781

Visual bug in Windows title bar with VCL Styles enabled application and display scaling

我与影子孤独终老i 提交于 2019-12-10 03:17:06
问题 Currently I am testing various aspects of VCL styles enabled applications. I noticed, that with Windows scaling higher than the default 96 dpi/100%, the icon and the title bar text of the VCL Form are too big in size - and both are to close together -, please see attached screenshots. This is especially true with higher scalings like 200% or 250% (e.g. used on 4K displays and Windows 10), but even with a scaling of 144 dpi/150%, the problem is already visible. This is true for all styles

Using custom styles shows invalid characters when right-clicking a file in TOpenDialog

痴心易碎 提交于 2019-12-10 02:04:06
问题 See steps below to reproduce. Works well in XE2 but not XE8. Create a new VCL Forms Application - Delphi Place a TButton and a TOpenDialog on the form In the button OnClick event call OpenDialog1.Execute Run the program, open the file dialog, and right-click on a text file => shows menu items ok Go to Project/Options/Application/Appearance. Enable and choose a custom style (such as "Ruby Graphite") and recompile Run the program, open the file dialog, and right-click a text file => does not

Changing font of TActionMainMenuBar when using Vcl styles

邮差的信 提交于 2019-12-09 18:36:18
问题 Normally one could change the font of a TActionMainMenuBar or TMainMenu like this: Screen.MenuFont.Name := 'Calibri'; When using Vcl styles this isn't possible any more if a StyleHook is registered for the component. I went into the Bitmap Style Designer (formerly known as Vcl Style Designer) and changed the font for the MenuItemTextNormal . Problem is that changing the Font does nothing, I can only successfully change the Color of the text. Clearly I'm missing something here, why can I

Delphi XE2, vcl styles recreating window handle

淺唱寂寞╮ 提交于 2019-12-09 17:38:58
问题 After applying a new style at runtime the MainForm of my application creates a new window handle – is there any way to stop this or reassign the Handle as I a getting a tonne of the following error: 'System Error. Code: 1400. Invalid window handle' Is there any way to manipulate the process that forces the new handle to be assigned? I solved this doing the following: My main form created an unseen 'helper' form that is never displayed, but that does have visual components - it was throwing

how to make a transparent form when a VCL Style is enabled?

泪湿孤枕 提交于 2019-12-08 15:59:22
问题 I'm using the following code to make a form transparent, but when the application has a VCL style enabled the form is paint with the background color of the VCL style instead of be transparent. uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs; type TForm1 = class(TForm) procedure FormShow(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } procedure CreateParams(var