[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


SWT detecting system color changes

Posted on 2004-10-25
Medium Priority
Last Modified: 2008-01-09
I have a SWT app using the CTabFolder and I am setting it's color to a gradient based on the system colors.  It works perfectly and looks great.

The problem is that when the system colors are changed after the control is created it doesn't update the CTabFolder colors.  I think I need to add a listener to the display object but I can't seem to figure out what it is I should be listening for.  Also, since the tabs are created at runtime on demand, how would I loop through them and change the colors when the listener is fired?
Question by:radixk
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 12401396
Yeah, you'll probably need to create a Thread to keep checking the system colours, and if they change, it updates the CTabFolder.


Author Comment

ID: 12404251
I figured this one out.

I created a Hashtable at startup and placed the current system colors in it.  I then created a paint listener in the CTabFolder and then compared the Hashtable to the current system colors.  If they're different, I set the colors and then update the hashtable with the current colors.

Works perfect.

Expert Comment

ID: 12404270
Sounds nice ;)

Go here: www.experts-exchange.com/Community_Support/

And request a thread deletion and refund of points :)

best of luck for the future

Accepted Solution

ee_ai_construct earned 0 total points
ID: 12407259
Question answered by asker or dialog valuable.
Closed, 250 points refunded.
ee_ai_construct (replacement part #xm34)
Community Support Admin

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question