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 » TreeCtrl » Change font color in TreeCtrl
Change font color in TreeCtrl [message #37628] Sun, 28 October 2012 21:31 Go to previous message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
Simple question: Is it possible to set font color of TreeCtrl? How?
I tried,
struct MyDisplay : public Display {
  virtual void MyDisplay::Paint(Draw& w,const Rect& r,
                                const Value& q,Color ink,
                                Color paper,dword style) const
  {
    w.DrawRect(r, paper);
    w.DrawText(r.left, r.top, text, StdFont(), Blue()); // <- the color I want goes in here
  }
};

...

TreeCtrl tree;
tree.SetDisplay(Single<MyDisplay>());

...

but it does not work: I add items to tree, item text shows fine, but vanish when I SetDisplay(Single<MyDisplay>()). Am I missing something?

Thanks.

 
Read Message
Read Message
Read Message
Previous Topic: PROPOSAL: seperate backend from frontend
Next Topic: OptionTree loses check state when add Callback for the option.
Goto Forum:
  


Current Time: Sun Apr 28 00:32:22 CEST 2024

Total time taken to generate the page: 3.01448 seconds