U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » TreeCtrl » Anomaly in tree control
Re: Anomaly in tree control [message #29783 is a reply to message #29782] Tue, 16 November 2010 11:57 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I does appear to be a bug. The TreeCtrl uses a pool of nodes to reduce allocation times but doesn't reset Node::isopen on a new Insert. In this case that means that the node thinks it's open but iot doesn't have a sub-tree because the WhenOpen callback hasn't been triggered.

The additon of:
m.isopen = false;

to TreeCtrl::Insert fixes the problem.

This example will still not be able to remember the openness of nest trees though. If you want dynamic sub-tree creation while remembering the opneness of sub-trees you'll have to remember fodler states yourself.

[Updated on: Tue, 16 November 2010 11:58]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Basic query: id, key and value in a TreeCtrl.
Next Topic: Changing tree control style
Goto Forum:
  


Current Time: Thu Aug 27 10:20:25 GMT+2 2026

Total time taken to generate the page: 0.00732 seconds