Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Look and Chameleon Technology » Colored text in Button
Colored text in Button [message #60695] Tue, 23 July 2024 14:33 Go to next message
forlano is currently offline  forlano
Messages: 1202
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I need to change the color of the text associated to a Button.
I cannot find a simple way to do it.
Is it supposed to use Chameleon for this task?

Thanks,
Luigi

[Updated on: Thu, 25 July 2024 00:25]

Report message to a moderator

Re: Colored text in Button [message #60705 is a reply to message #60695] Thu, 25 July 2024 11:08 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 694
Registered: November 2008
Location: France
Contributor
Hello Forlano,
I think there IS a dedicated method for text color (i can't check right now).
But you Can Always use QTF text to display whatever you wan't)
All you have to do IS start you're text with thé QTF escape sequence: "\1". (I'm not dure if it's thé right séquence)
Re: Colored text in Button [message #60708 is a reply to message #60705] Fri, 26 July 2024 10:08 Go to previous message
forlano is currently offline  forlano
Messages: 1202
Registered: March 2006
Location: Italy
Senior Contributor
Didier wrote on Thu, 25 July 2024 11:08
Hello Forlano,
All you have to do IS start you're text with thé QTF escape sequence: "\1". (I'm not dure if it's thé right séquence)


Thank you.
It works. This set a centered red label

l = "\1[@6= " << label << "]";
btn.SetLabel(l);


Luigi
Previous Topic: LabelBox disappear in DarkMode under Windows
Next Topic: Text scaling in U++
Goto Forum:
  


Current Time: Fri Dec 13 22:10:40 CET 2024

Total time taken to generate the page: 0.02969 seconds