CyberPeter 14 Posted Friday at 10:05 AM I can set a StyleName for a particular control, for instance: MyCustomControlDescendant->StyleName = L"Windows11 Modern Light" ; However, this only works if a Style has been applied application wide: TStyleManager::TrySetStyle() (Any Style) Usually I prefer no Style, because Styles do flicker a lot etc. But for a TrackBar for instance, an ugly control, a Style feels appropriate. Sadly assigning one to just the control via StyleName is not possible, unless I first load a style application wide My question, is it possible at all and if so, how ? Share this post Link to post
Rollo62 568 Posted Friday at 10:15 AM Flicker? Is that the case under VCL? Maybe this is interesting for setting per control https://blogs.embarcadero.com/vcl-per-control-styles-coming-in-rad-studio-10-4/ Share this post Link to post
aehimself 402 Posted Friday at 08:19 PM I had one situation when VCL styles flickered a lot, and that was if they were on an anchored / aligned panel and the form was being resized. Setting .ParentBackround := False on the panel solved this though. Share this post Link to post
CyberPeter 14 Posted Friday at 10:34 PM 12 hours ago, Rollo62 said: Flicker? Is that the case under VCL? Maybe this is interesting for setting per control https://blogs.embarcadero.com/vcl-per-control-styles-coming-in-rad-studio-10-4/ VCL yes. Thank you I will check out the article. Share this post Link to post
CyberPeter 14 Posted Friday at 10:39 PM (edited) 2 hours ago, aehimself said: I had one situation when VCL styles flickered a lot, and that was if they were on an anchored / aligned panel and the form was being resized. Setting .ParentBackround := False on the panel solved this though. It's just a general thing in more complex applications (I find), especially with ListView and TreeView etc. and especially when the computer runs a bit slower (had some pc fan issues and the reduced speed made it very obvious). In my applications styles are implemented to be able to support a dark theme but I personally prefer to use simply Windows for the best performance. For a static application with some buttons etc, styles can be nice, but for faster moving data, scrolling etc. Styles reduce the perceived quality of the application (in my view). When I dynamically create a form with lots of components on it (e.g. an Options Window) there is very obvious flicker as well while the window comes into view Edited Friday at 10:43 PM by CyberPeter Share this post Link to post
Brian Evans 114 Posted Friday at 11:54 PM Don't forget the difference between a user trying to get work done in an application vs a developer playing/scrolling around. I find a modern styled application can be easier for a user to read and follow as they work on the content shown in the application. Some appreciate being able to adjust things to their taste - especially older workers desiring larger fonts and more contrast. Users rarely dynamically resize forms these days - either it is full screen or snapped to half a screen or some other region. I have gotten distracted working on things that seemed important - speed while users really wanted predictability. For example a form frozen for 4 seconds feels worse to a user than an active form showing progress that takes 15 seconds. When developing I might scroll through 1000's of records while a user is more likely to search and display 10-100 records and examine them when actually doing work. 1 Share this post Link to post
CyberPeter 14 Posted Monday at 02:48 AM On 4/4/2025 at 8:45 PM, Rollo62 said: Maybe this is interesting for setting per control https://blogs.embarcadero.com/vcl-per-control-styles-coming-in-rad-studio-10-4/ I tried the suggested TStyleManager::UseSystemStyleAsDefault = true ; but that doesn't do anything unless I load a style just so that the style manager gets 'activated' : TStyleManager::TrySetStyle(L"Windows11 Modern Dark", false /*Do not show Error Message*/) ; which of course negatively affects other custom components that use the Style class to get color information about background etc. So in order to implement this, everything needs to be reviewed essentially. That's a bummer. Share this post Link to post