Home » Community » Newbie corner » TreeCtrl: How to...?
TreeCtrl: How to...? [message #28825] |
Sat, 18 September 2010 13:01 |
281264
Messages: 270 Registered: June 2010 Location: Spain
|
Experienced Member |
|
|
Chaps:
Allow me to ask some questions concerning TreeCtrl. Here they go:
1.- What is the role of id, key and value? I think id is assigned automatically at the time a node is added and one can not control it-??;
2.- How to modify the look of the TreeCtrl? For example how to implement a Display? I am trying this in a .h file:
struct MyDisplay: public Display{
virtual void Paint(Draw& w, const Rect& r, const Value& q, Color ink,Color paper,dword style){
w.DrawRect(r,paper);
}
};
And this in the implementation:
tree.SetDisplay(Single<MyDisplay>());
but I do not have a clear understanding of Display behaviour. For example if I wanted to modify the font, font color, backcolor, etc of an element of the tree when it is clicked, how to do it?
3.- How is Value q passed to a Display?
Many thank.
Cheers,
Javier
|
|
|
Goto Forum:
Current Time: Tue Jun 11 22:40:34 CEST 2024
Total time taken to generate the page: 0.01978 seconds
|