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 » Tree Control - how to access properties of node.ctrl?
Re: Tree Control - how to access properties of node.ctrl? [message #10446 is a reply to message #10444] Mon, 09 July 2007 18:42 Go to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
nixnixnix wrote on Mon, 09 July 2007 10:18

Thanks Mirek,

Is this a UPP peculiarity or am I just needing to read a book on the finer points of C++?



Well, yes, that would help as well as looking at Ptr interface Smile

BTW, in U++ we are very often using operator~ in this exact situation - we overload it to provide a "cast to natural type", e.g. for String, it returns const char *....

Quote:


p.s. in case you are interested, I don't want to use IDs because the user needs to be able to order and reorder the tree by dragging and dropping nodes so the IDs assigned by the tree are pretty much useless to me as I understand it. This is why I use pointers to my Layer objects (each layer having an array of pointers to child layers and one parent layer pointer). Layers draw their children and so on. The customised option control enables me to communicate between the tree view and the main view which displays the layer content.


That is OK, as long as the only way how to remove nodes is with the whole tree. If you are allowed to remove individual node, then you have to make sure the node Ctrl instance is destroyed...
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Two problems (1 serious) with TreeCtrl
Next Topic: Right Clicking Tree Nodes?
Goto Forum:
  


Current Time: Thu Aug 21 14:41:35 CEST 2025

Total time taken to generate the page: 0.04939 seconds