vcl-styles

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

怎甘沉沦 提交于 2019-12-05 16:18:01
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. 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. //declare this code in the implementation part uses Vcl.Themes, Vcl.Styles; type TLabelHelper= class helper for

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

旧巷老猫 提交于 2019-12-05 15:33:40
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 ? 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/how-to-change-color-of-the-scrollbar-in-synmemo-with-vcl-styles

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

北战南征 提交于 2019-12-05 01:33:04
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 show menu items correctly (invalid characters are shown) Tested with XE8 Subscription Update 1 (and

Changing font of TActionMainMenuBar when using Vcl styles

偶尔善良 提交于 2019-12-04 11:17:09
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 change the Color but not the Font? As you say changing the font of the MenuItemTextNormal element (or any

Delphi XE2, vcl styles recreating window handle

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 06:45:32
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 the handle error when it was trying to redraw these visual components, so I replaced the relevant

Is VclStyle Bug ? TProgressBar.Style := pbstMarQuee Does not work

守給你的承諾、 提交于 2019-12-04 05:03:37
Is VclStyle Bug ? T^T I tried to find BugFix list(http://edn.embarcadero.com/article/42090/) but I can't File > New > VCL Application TProgressBar put main form >TProgressBar.Style := pbstMarQuee Project Option > Appearence > set Custom Style > set Default Style Ctrl + F9 ProgressBar does not work Sorry. My english is bad :( This is a feature not implemented in the TProgressBarStyleHook . Unfortunally Windows does not send any message to the progress bar control to indicate if the position of the bar changes when is in marquee mode , so you must implement your self a mechanism to mimic the PBS

Is there any Delphi XE2 styles gallery?

依然范特西╮ 提交于 2019-12-02 21:58:12
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 ? RRUZ 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 styles and FireMoney styles in few clicks. Both articles include additional styles to download.

Disabling TButton issue on a VCL styled form

假装没事ソ 提交于 2019-12-01 14:53:55
问题 When I try to disable a Button on a styled VCL from using the follwing line of code TButton(Sender).enabled:= False; I get the this result (Button disabled at runtime) instead of this!! (Button disabled at design time) It's really confusing to have two or more Buttons with the same color beside each other, one is disabled and the other is enabled 回答1: The cause of this issue is located in the Paint method of the TButtonStyleHook (in the Vcl.StdCtrls unit) style hook class. Locate this code in

close button of a tabsheet not supporting vcl styles

我的梦境 提交于 2019-12-01 06:22:17
I have used the code provided in this example How to implement a close button for a TTabsheet of a TPageControl to draw a close button to each tabsheet of a pagecontrol and I have replaced ThemeServices with Style Services inside the code and when applying styles the close button doesn`t show and react in no way. Could anyone point me to a different path o solving this issue. thank you! this is the code of the OnDrawTab event: procedure TFormMain.PageControlCloseButtonDrawTab(Control: TCustomTabControl; TabIndex: Integer; const Rect: TRect; Active: Boolean); var CloseBtnSize: Integer;

close button of a tabsheet not supporting vcl styles

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 05:16:53
问题 I have used the code provided in this example How to implement a close button for a TTabsheet of a TPageControl to draw a close button to each tabsheet of a pagecontrol and I have replaced ThemeServices with Style Services inside the code and when applying styles the close button doesn`t show and react in no way. Could anyone point me to a different path o solving this issue. thank you! this is the code of the OnDrawTab event: procedure TFormMain.PageControlCloseButtonDrawTab(Control: