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 » Bug changing text after node insertion
Re: Bug changing text after node insertion [message #16923 is a reply to message #16921] Mon, 21 July 2008 10:23 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1402
Registered: September 2007
Ultimate Contributor
It is getting closer. There is still a problem as you can see in this screenshot I created. The text is diplayed once for the label and once for the key/value. It seems to display the value.

I'm using SetLabel, and also the normal Set to set key and value. I also use a modified version of Copy to repopulate another tree with the checked items of this tree.

int CopyIfSelected(TreeCtrl& dst, int did, const OptionTree& src, int id)
{
	TreeCtrl::Node x = src.GetNode(id);
	x.ctrl = NULL;
	int orig = did;
	if (src.Get(id))
		did = dst.Add(did, x);
	dst.Open(orig);
	for(int i = 0; i < src.GetChildCount(id); i++)
		CopyIfSelected(dst, did, src, src.GetChild(id, i));
	return did;
}


When I use Set, the first parameter is a struct and the second one is the string that I display. Swapping these around or leaving out the second string parameter will clear the extra text that appears in the right, but the are is still clickable, leaving a small little gray rect when clicked. I could live with that for now, but both swapping the parameters or leaving one out will render my CoyIfSelected function useless, because it will not set the text in the destination Tree.
  • Attachment: untitled5.PNG
    (Size: 11.78KB, Downloaded 395 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IsSelected(id)
Next Topic: Clear() and external controls as nodes
Goto Forum:
  


Current Time: Tue Jun 11 04:20:00 CEST 2024

Total time taken to generate the page: 0.01812 seconds