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 » How to add a structure to tree node
How to add a structure to tree node [message #46021] Fri, 19 February 2016 15:41 Go to next message
WebChaot is currently offline  WebChaot
Messages: 52
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 Go to previous message
Novo is currently offline  Novo
Messages: 642
Registered: December 2006
Veteran
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.


Novo
Previous Topic: Manually set option in OptionTree
Next Topic: TreeCtrl display bug
Goto Forum:
  


Current Time: Fri Aug 18 03:07:40 CEST 2017

Total time taken to generate the page: 0.00544 seconds