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 » How to change window background?
Re: How to change window background? [message #37956 is a reply to message #37952] Sat, 24 November 2012 20:36 Go to previous messageGo to previous message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
Two alternatives:

GUI_APP_MAIN {
  // Define the colors you want to your window by calling the
  // many ::SColorXXX_Write(Color) functions before running
  // your app
  ::SColorFace_Write(Color(r, g, b));
  ::SColorText_Write(Color(r, g, b));
  ...
  MyApp().Run();
}


or override your window Paint method
  class MyApp : public TopWindow
  {
   public:
     MyApp() {}

     // Paint override
     void Paint(Draw& w) {
        w.DrawRect(GetSize(), Color(r, g, b)); // <= enter your background color here
     }
  };

GUI_APP_MAIN
{
  MyApp().Run();
}


 
Read Message
Read Message
Read Message
Previous Topic: undesired behavior using custom styled MenuBar
Next Topic: look of ctrl with styled horz and vert scrollbars
Goto Forum:
  


Current Time: Thu May 16 19:28:44 CEST 2024

Total time taken to generate the page: 0.02382 seconds