Home » U++ Library support » TreeCtrl » How to add a structure to tree node
How to add a structure to tree node [message #46021] |
Fri, 19 February 2016 15:41  |
WebChaot
Messages: 53 Registered: September 2006 Location: Austria, Vienna
|
Member |
|
|
Hello!
I tried to add a structure to each node of TreeCtrl.
I used examples to find out how - and it works so far. I can set and get structure (RawToValue and back) - but unfortunately the Label is not longer drawn on each node in Tree. I implemented ToString() and ~ to my struct, but does not work.
And the second question is: When I solved first problem - is it possible to use AttrText - even when value is a struct and only one part of it represents the node label?
Or maybe for both questions: Will I need to add a display for this special case (where I split my struct and also set my AttrText properties)?
Thanks a lot!
WebChaot
|
|
|
Re: How to add a structure to tree node [message #46026 is a reply to message #46021] |
Sat, 20 February 2016 06:09  |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
I believe it is enough to use just a Convert. You take your struct and return either plain text or QTF (Default Display knows how to draw text and QTF). You need custom Display only in case when you want to draw something your way.
Hope this helps.
Regards,
Novo
|
|
|
Goto Forum:
Current Time: Fri Apr 25 13:28:33 CEST 2025
Total time taken to generate the page: 0.00740 seconds
|