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 » U++ Widgets - General questions or Mixed problems » Button color Foreground Background
Button color Foreground Background [message #5466] Sun, 24 September 2006 20:45 Go to next message
djesus is currently offline  djesus
Messages: 14
Registered: September 2006
Promising Member
Is possible to set a Button color Background and/or Foreground?

Thanks a lot
Re: Button color Foreground Background [message #5470 is a reply to message #5466] Sun, 24 September 2006 23:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Yes, via SetStyle and chameleon (requires dev version).
Re: Button color Foreground Background [message #13341 is a reply to message #5466] Wed, 02 January 2008 12:01 Go to previous messageGo to next message
ChrisBB is currently offline  ChrisBB
Messages: 1
Registered: January 2008
Junior Member
Hi. I'm very sorry to bump such an old topic. This is exactly the question I was going to ask, but I do not understand the reply that was given. I can't find any reference to such features in the manual. Please could you (someone) go into a bit more detail?

[Updated on: Wed, 02 January 2008 12:04]

Report message to a moderator

Re: Button color Foreground Background [message #13348 is a reply to message #13341] Wed, 02 January 2008 18:26 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Well there are basically two ways to do it. If you want to apply a custom style to a specific button, you can use a function like this one:
void SetCustomStyle(Button &btn)
{
    static Button::Style style = btn.StyleNormal();
    //do stuff with it    
    btn.SetStyle(style);
}


Or if you wish to change the global "skin" of all buttons, look over the Chameleon package in the reference nest.
Previous Topic: Label and Focus
Next Topic: new DropList items cannot be inserted at the beginning
Goto Forum:
  


Current Time: Fri Apr 19 19:50:37 CEST 2024

Total time taken to generate the page: 0.03311 seconds