weabow 6 Posted July 31 Hi there, I've now spend somme hours to try to change the Background Color of a TButton, or TSpeedButton, at run time. But no way ! An idea ? Share this post Link to post
corneliusdavid 209 Posted July 31 TButton is a wrapper around a Windows control so doesn't natively support a custom color. To accomplish this, you could use TRzButton (from KSVC) and disable the ThemeAware property, then set its Color property. Share this post Link to post
Remy Lebeau 1375 Posted July 31 2 hours ago, corneliusdavid said: TButton is a wrapper around a Windows control That is true only if its ControlType property is set to Platform. The default is Styled instead, in which case it is not a native Windows control. (This is posted in an FMX group, not a VCL group) Share this post Link to post
corneliusdavid 209 Posted July 31 7 minutes ago, Remy Lebeau said: (This is posted in an FMX group, not a VCL group) Good point; I often forget to look at which group the message is in. Share this post Link to post
weabow 6 Posted August 1 Thanks a lot. I'de like to have a class inheriting from TButton, under FMX Crossplatform. How may I set the controltype in this case ? Share this post Link to post
Remy Lebeau 1375 Posted August 1 On 7/31/2024 at 9:45 AM, weabow said: I've now spend somme hours to try to change the Background Color of a TButton, or TSpeedButton, at run time. But no way ! Embarcadero posted a blog article about that for TEdit, but the same approach should work for a TButton as well: Edit Custom Style to change the background color of a FMX TEdit 6 hours ago, weabow said: How may I set the controltype in this case ? It is just a property like any other. What is stopping you from setting it? Share this post Link to post