Nathan Wild 3 Posted May 16, 2019 I am using a DBNavigator control in one of my applications and for some reason, When I place it on the form it looks fine, but as soon as I connect a datasource to it, all the buttons lose their colour. NOTE: I don't mean they are greyed-out / inactive. I mean where they used to show blue glyphs for the first, previous, next and last buttons, they now show grey ones. They work normally, and grey-out as they should depending on the state of the underlying dataset, but the difference between an enabled button and a disabled on is very hard to see without the colour! See the attached screen shot. The control on the right was just dropped onto the form, but does not have its datasource property populated. The one on the left is identical, except that it is connected to a TDataSource. This is definitely the result of a VCL theme thing, but I can't find any properties that allow me to tell this control to ignore the theme (i.e. the standard "StyleElements" property) Any guidance appreciated! Share this post Link to post
Uwe Raabe 2057 Posted May 16, 2019 Currently there is no way to disable themes on a per control basis that I know of. Share this post Link to post
mausmb 13 Posted May 16, 2019 (edited) Hi, property StyleElements: TStyleElements read FStyleElements write SetStyleElements default 7; Specifies the style elements that are used by the control. Use StyleElements to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. StyleElements is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. But for TdbNavigator is not possibile to set styleelements .. partial success with grids... br, M Edited May 16, 2019 by mausmb Share this post Link to post
Nathan Wild 3 Posted May 16, 2019 Good grief... It never even occurred to me to check and see if TDBNavigator had a StyleElement property... It is missing from the design-time inspector, so I just assumed it did not... Setting DBNavigator.StyleElements := [seFont,seBorder] had the desired effect. Thanks! Share this post Link to post