Home » U++ Library support » TreeCtrl » Change font color in TreeCtrl
Change font color in TreeCtrl [message #37628] |
Sun, 28 October 2012 21:31 |
|
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.
|
|
|
Goto Forum:
Current Time: Mon May 13 07:57:44 CEST 2024
Total time taken to generate the page: 0.02352 seconds
|