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 » FIX - Single Click does not open/close items
Re: FIX - Single Click does not open/close items [message #13583 is a reply to message #13564] Tue, 15 January 2008 15:48 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I'm not sure about that.

The purpose of the check in Paint is to draw the +/- indicator, but adding the check to open means that the node can be opened when canopen == false if the node has children. This makes canopen redundant and seems like incorrect behaviour.

If you want consistency I would rather remove the check from Paint:
if(m.canopen) { // or possibly: && m.child.GetCount())
	Image im = m.isopen ? CtrlImg::treeminus() : CtrlImg::treeplus();
	op -= im.GetSize() / 2;
	w.DrawImage(op.x, op.y, im);

Why would you want to indicate to the user that the node can be opened when it can't actually be opened (canopen == false)?

[Updated on: Tue, 15 January 2008 15:53]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to turn of tool-tips please?
Next Topic: A [TreeCtrl] bug
Goto Forum:
  


Current Time: Sun May 12 12:40:57 CEST 2024

Total time taken to generate the page: 0.01841 seconds