Frederick Posted October 10, 2023 Share Posted October 10, 2023 At design time, I set the color property of a TUniDBFormattedNumberEdit control to clLime. At runtime, the color reverts back to clWhite. How do I make the colour stick? -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1573) Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 10, 2023 Author Share Posted October 10, 2023 It seems that the inability to set the colour at runtime happens when I use the theme of Uni_win11_polar_light. If I switch to Uni_Flat_Black (and probably other older themes), the colours set at design time also show up at runtime. Can this problem be resolved? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 10, 2023 Share Posted October 10, 2023 Hello, So, is the problem only in this theme Uni_win11_polar_light? Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 10, 2023 Author Share Posted October 10, 2023 Any theme that begins with uni_win11* has the problem. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 10, 2023 Share Posted October 10, 2023 10 minutes ago, Frederick said: Any theme that begins with uni_win11* has the problem. Okay. But, on the one hand, the theme is there to adhere to a certain style and color schemes. How do you think? Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 10, 2023 Author Share Posted October 10, 2023 I think that since the older themes support a general look-and-feel but allow colour settings for the background, newer themes should allow the same customisations. Interestingly, Uni_Windows11 works fine with colour changes at runtime but I prefer the header colour in Uni_Win11_Polar_Light. Alternatively, offer the following options:- 1. No theme support (I can control all aspects of the look and feel of the application) 2. Allow users to inherit from existing themes and make changes so that the look-and-feel matches their application or their client requirements Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 12, 2023 Author Share Posted October 12, 2023 Is it possible to overwrite how the theme uni_win11_polar_light works? The following code works with the classic theme during runtime but not uni_win11_polar_light:- UniDBFormattedNumberEdit1.Color:=clLime Quote Link to comment Share on other sites More sharing options...
Frederick Posted October 30, 2023 Author Share Posted October 30, 2023 I upgraded to 1.95.0.1574 and setting the following properties for TUniDBFormattedNumberEdit during runtime results in:- TUniDBFormattedNumberEdit1.Font.Color:=clRed; // Works TUniDBFormattedNumberEdit1.Color:=clYellow; // Does not work How can I get the latter to work? I change the background colour from clWhite to clYellow to inform the user that there is a mistake in their data entry and this problem is causing issues with my application. The theme is uni_win11_polar_light. With uni_flat_black, both properties work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.