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 #13589 is a reply to message #13583] Tue, 15 January 2008 20:54 Go to previous messageGo to previous message
loki is currently offline  loki
Messages: 36
Registered: October 2007
Member
Ok. I have corrected it to match the painting. But if the painting is wrong, my correction is also wrong... Rolling Eyes

In other words we should change the painting. I think you are right. (I had an other meaning about canopen).

1) (canopen && childcount > 0) ---> +/- is drawn.
2) (canopen && childcount <= 0) ---> +/- is not drawn.
3) (!canopen && childcount > 0) ---> +/- is drawn in disabled state (grey)
4) (!canopen && childcount <= 0) ---> +/- is not drawn.

if(m.child.GetCount()) {
	Image im;
	if(m.canopen)
		im = m.isopen ? CtrlImg::treeminus() : CtrlImg::treeplus();
	else
		im = m.isopen ? CtrlImg::treeminusgrey() : CtrlImg::treeplusgrey();
	op -= im.GetSize() / 2;
	w.DrawImage(op.x, op.y, im);
}

treeminusgrey and treeplusgrey are new. I don't know if there is a drawing function which could grey the normal ones.

Is this ok?

greetings
loki

[Updated on: Tue, 15 January 2008 21:40]

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: Sat May 11 23:17:53 CEST 2024

Total time taken to generate the page: 0.01853 seconds