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

Home » U++ Library support » TreeCtrl » Bug changing text after node insertion
Bug changing text after node insertion [message #16834] Wed, 16 July 2008 10:33 Go to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
I have an OptionTree which I need to populate with dummy nodes and then change their text at a later moment. Since I couldn't find a way to change the text directly, I used GetNode/SetNode combination. The strange part is that the OptionTree will now display both the old text and the new one. If the dummy nodes have no text, when selecting a node only the null text will be highlighted. Also, nodes select differently based on where you click: the old text or the new text.

Test case attached.

PS: Is it only me, or is gdb/gdb integration a lot stupider than with MinGW. The debugger is barely functional and very slow to start-up.
  • Attachment: Test.zip
    (Size: 1.20KB, Downloaded 507 times)
Re: Bug changing text after node insertion [message #16840 is a reply to message #16834] Wed, 16 July 2008 17:54 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
I found this solution:

#include "Test.h"

Test::Test()
{
	CtrlLayout(*this, "Window title");

	int n;
	
	n = t.Add(0, "DUMMY1");
	t.Remove(t.GetChildIndex(0, n)+1);
	t.Add(0, "real1");

	n = t.Add(0, "DUMMY2");
	t.Remove(t.GetChild(0, 1));
	t.Add(0, "real2");

	t.Open(0);
}

GUI_APP_MAIN
{
	Test().Run();
}

GetChildIndex somehow returns an id 1 less than the needed one that is why there is +1. I am not sure if this is the wanted behavior.

Matthias
Re: Bug changing text after node insertion [message #16859 is a reply to message #16840] Thu, 17 July 2008 16:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
The problem here is that the text in Add (which is defined in OptionTree) actually sets the label of Ctrl. So in fact you should change the "ctrl" member of Node.

Anyway, to make this simpler, I have added this:

void OptionTree::SetLabel(int id, const char *text)
{
	Node n = GetNode(id);
	Option *o = dynamic_cast<Option *>(~n.ctrl);
	if(o)
		o->SetLabel(text);
	SetNode(id, n);
}


Mirek
Re: Bug changing text after node insertion [message #16860 is a reply to message #16859] Thu, 17 July 2008 17:57 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
Thank you masu for investigating. Still, removing nodes and adding then is much more complicated that it should be and doesn't address the problem directly.

Mirek's function would solve the problem but from a purist point of view it doesn't make that much sense. Nodes do not logically have a label property. If we accept setting the label as a valid operation, than what is the difference between setting the label and setting the key. Are both operations defined? Can you mix them? If you mix them can you get a combination that results in two labels again? And why does adding a node behave differently than setting the node to a different value?

Shouldn't we rather add SetKey/SetValue functions, or just Set variant for both, as in Node and other cases? Anyway, which value is the key and which is the values and which is passed to Display/Converts is not too clear.

[Updated on: Thu, 17 July 2008 17:57]

Report message to a moderator

Re: Bug changing text after node insertion [message #16861 is a reply to message #16860] Thu, 17 July 2008 18:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Thu, 17 July 2008 11:57

Thank you masu for investigating. Still, removing nodes and adding then is much more complicated that it should be and doesn't address the problem directly.

Mirek's function would solve the problem but from a purist point of view it doesn't make that much sense. Nodes do not logically have a label property. If we accept setting the label as a valid operation, than what is the difference between setting the label and setting the key. Are both operations defined? Can you mix them? If you mix them can you get a combination that results in two labels again? And why does adding a node behave differently than setting the node to a different value?

Shouldn't we rather add SetKey/SetValue functions, or just Set variant for both, as in Node and other cases? Anyway, which value is the key and which is the values and which is passed to Display/Converts is not too clear.


I believe "SetLabel" is perfectly logical. If you start putting widgets into tree (which is what you do when you are going to use OptionTree), you must accept the fact these widgets have some properties.

Note that OptionTree has already "Get" method to read the value of option...

Mirek
Re: Bug changing text after node insertion [message #16887 is a reply to message #16859] Sat, 19 July 2008 16:03 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
Very well, I'll use something that works, rather than argue about semantics.

But SetLabel does not seem to work for me. I tried both before and after setting the key and value, and it does not set the text.

The reason is because it does not resize the child control whose label is set, so there is not enough space to display the text.

Also, setting canselect to false for a node does not allow you to select it, but it's check value can still be set.
Re: Bug changing text after node insertion [message #16888 is a reply to message #16887] Sat, 19 July 2008 19:37 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Well, I am afraid this will be more difficult to fix... Sad

Anyway, for now, what about leaving the "label" empty (in Add) and using Node to set the text?

Mirek
Re: Bug changing text after node insertion [message #16901 is a reply to message #16888] Sun, 20 July 2008 08:25 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
That's exactly what I'm using right now, but it is only a temporary solution since it has some display bugs as it is.

Since the control reacts differently depending on which part you clicked (the option or outside of it), it will always highlight the empty text from the option and color the rest gray. This is not a high priority task for me to get it fixed, but it about a two weeks it would be great to have it working. I don't have time this week to look into OptionTree, but I'll try to fix it myself when I'll have time (or I really need it Smile).
Re: Bug changing text after node insertion [message #16921 is a reply to message #16901] Mon, 21 July 2008 09:12 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
Well, I hope this fixes the fix:

TreeCtrl::Node::Node(const Image& img, Ctrl& ctrl, int cx, int cy)
{
	Init();
	SetCtrl(ctrl);
	image = img;
	size = Null;
	if(cx > 0)
		size.cx = cx;
	if(cy > 0)
		size.cy = cy;
}


Mirek
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 next message
cbpporter is currently offline  cbpporter
Messages: 1428
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 555 times)
Re: Bug changing text after node insertion [message #16924 is a reply to message #16923] Mon, 21 July 2008 10:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 21 July 2008 04:23

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.


I guess we will need GetLabel too....

Mirek
Re: Bug changing text after node insertion [message #16925 is a reply to message #16924] Mon, 21 July 2008 11:11 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
If the double text is fixed, I think we can drop GetLabel (and maybe even SetLabel). If the value is set, TreeCtrl will still display the text.
Re: Bug changing text after node insertion [message #16926 is a reply to message #16925] Mon, 21 July 2008 11:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 21 July 2008 05:11

If the double text is fixed, I think we can drop GetLabel (and maybe even SetLabel). If the value is set, TreeCtrl will still display the text.


Ehm, but it is not a double text... These are different things, the label is an attribute of widget... Widget can have more than one attributes.

OK, one possible solution would be to supress the "value" when ctrl is set for the node. OTOH I believe that current solution when both are used is in fact more general.

Mirek
Re: Bug changing text after node insertion [message #16927 is a reply to message #16926] Mon, 21 July 2008 12:36 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
luzr wrote on Mon, 21 July 2008 12:52


Ehm, but it is not a double text... These are different things, the label is an attribute of widget... Widget can have more than one attributes.

OK, one possible solution would be to supress the "value" when ctrl is set for the node.
Mirek

I know that the two text are from different sources, one is the label of the Option and the other is the value painted on the control (with a huge space between then, probably because of the Width of the Option), but still by my definition if there are two text (doesn't matter why), that constitutes a double text Smile.

Yes, suppressing it and moving the region in which when you click an item it will be highlighted with a dotted rect so that it encapsulates the Option would probably work.

Quote:


OTOH I believe that current solution when both are used is in fact more general.


I'm not sure I understand. What is current solution? Or do you mean solution as in the way things work right now, not "solution to my problem".
Re: Bug changing text after node insertion [message #16928 is a reply to message #16927] Mon, 21 July 2008 12:57 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 21 July 2008 06:36


I'm not sure I understand. What is current solution? Or do you mean solution as in the way things work right now, not "solution to my problem".



As things work right now.

I believe that there are many usage cases where you would like to see both the widget and the value.

Mirek
Re: Bug changing text after node insertion [message #16929 is a reply to message #16928] Mon, 21 July 2008 14:04 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
So you mean that the way that screenshot looks is the intended behavior?
Re: Bug changing text after node insertion [message #16930 is a reply to message #16929] Mon, 21 July 2008 14:29 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 21 July 2008 08:04

So you mean that the way that screenshot looks is the intended behavior?


I am not sure where that big whitespace gap came from.

But double texts are OK.

Mirek
Re: Bug changing text after node insertion [message #16932 is a reply to message #16930] Mon, 21 July 2008 14:56 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
I guess we have different representations on what a tree control should do.

Maybe it would be better for me to find a different solution rather than tweak OptionTree to suit my needs, since it seems that it was built with other needs in mind.

Also, I think there is something broken with MINGW debugger. I download RC2 today and debugging doesn't work for me. It was always a little buggy under MINGW, but it was usable. But now, break points are sometimes ignored step in and over don't work at all.

[Updated on: Mon, 21 July 2008 14:56]

Report message to a moderator

Re: Bug changing text after node insertion [message #16933 is a reply to message #16932] Mon, 21 July 2008 15:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 21 July 2008 08:56

I guess we have different representations on what a tree control should do.

Maybe it would be better for me to find a different solution rather than tweak OptionTree to suit my needs, since it seems that it was built with other needs in mind.



Actually, you might be right about this - since the first moment I wonder why do you need such complicated manipulation with the tree.

Usually, in cases like this, I tend to have separate data model and only dump it into the widget before user interaction is required.

Mirek
Re: Bug changing text after node insertion [message #16934 is a reply to message #16933] Mon, 21 July 2008 17:28 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
It's not that complicated. All I need is to populate a tree, replace the text of nodes (the text can only be determined after the structure, kind of stupid really but no easy way to change this now) and a tree with options which displays/has/can use exactly one value under these circumstances. I also need the nodes to be selectable, not just check/unchecked toggle.
Re: Bug changing text after node insertion [message #16939 is a reply to message #16924] Tue, 22 July 2008 09:32 Go to previous messageGo to next message
masu is currently offline  masu
Messages: 378
Registered: February 2006
Senior Member
luzr wrote on Mon, 21 July 2008 10:43

I guess we will need GetLabel too....

I agree, I need it and it is more consistent to have Set and Get methods.

Matthias
Re: Bug changing text after node insertion [message #16942 is a reply to message #16939] Tue, 22 July 2008 12:10 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
Ok, so there are two solutions to my problem

Solution number 1: write a new TreeCtrl that behaves the way I consider it intuitive. This is the best solution, but developing and testing a powerful TreeCtrl would take a lot of time, time which I don't have right now. I'll put it on the list of "things to do in my holiday".

Solution number 2: try and use what there is.

I created a separate data model to hold the tree, and now I don't have to do all that manual node handling because I populate the tree with a four line recursive function.

I do need GetLabel and since Matthias also needs it, we should add something like this:
String OptionTree::GetLabel(int id) const
{
	Node n = GetNode(id);
	Option *o = dynamic_cast<Option *>(~n.ctrl);
	if(o)
		return o->GetLabel();
	
	return "";
}

For this to work, GetLabel must be added to Pusher also, class which strangely does not have this method.

Now all works pretty much as expected. All I need to do is make the control select the item that is clicked upon. Any suggestions how to do this with OptionTree?
Re: Bug changing text after node insertion [message #16947 is a reply to message #16942] Tue, 22 July 2008 15:56 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
cbpporter wrote on Tue, 22 July 2008 11:10

Now all works pretty much as expected. All I need to do is make the control select the item that is clicked upon. Any suggestions how to do this with OptionTree?

I must admit to not being able to follow this thread or work out exactly what it is you are trying to do Smile

However, I believe you can achieve the above like this (as long as you are using "" labels for the Options and setting the text with node values):
// Add a callback to the Option (must be added not to break SetOption)
tree.GetNode(nodeid).ctrl->WhenAction << THISBACK(OptionClick);

// Callback function
// Fake left click as if the option wasn't there
void OptionClick()
{
	dword flags = GetMouseFlags();
	Point p = tree.GetMouseViewPos();
	tree.LeftDown(p, flags);
	tree.LeftUp(p, flags);
}

The only other thing is that there seems to be a bug with MultSelect + Ctrls. To get selection working correctly with the Ctrl key I had to modify ChildGotFocus to stop it clearing the selection constantly.
void TreeCtrl::ChildGotFocus()
{
	if (multiselect) return; // Don't clear multi-selection!
	for(int i = 0; i < line.GetCount(); i++) {
		Item& m = item[line[i].itemi];
		if(m.ctrl && m.ctrl->HasFocusDeep()) {
			SetCursorLine(i);
			return;
		}
	}
}
but you could equally do this by using a sub-class of OptionTree with an empty ChildGotFocus function.
Re: Bug changing text after node insertion [message #16954 is a reply to message #16942] Wed, 23 July 2008 10:10 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Tue, 22 July 2008 06:10


Now all works pretty much as expected. All I need to do is make the control select the item that is clicked upon. Any suggestions how to do this with OptionTree?


Well, this is deep trouble... Either you can have Option to respond to mouse or TreeCtrl to respond.

Partial solution is to not use Option's Label (leave it empty) and put its text to Node's Value (haha, back at it again Smile. Then clicking the option box will toggle the option, clicking the text will do selections.

Other possibility is to use create your own Option and somewhat connect clicks to Option's text to TreeCtrl selection. Then use plain TreeCtrl with this new creation.

Mirek

P.S.: Added GetLabel, in this simple form:
TreeCtrl::
	String GetLabel(int id) const                   { return option[id]->GetLabel(); }


and GetLabel to Pusher as well (being there, GetFont too...)

[Updated on: Wed, 23 July 2008 10:16]

Report message to a moderator

Re: Bug changing text after node insertion [message #16955 is a reply to message #16947] Wed, 23 July 2008 10:19 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
mrjt wrote on Tue, 22 July 2008 09:56


void TreeCtrl::ChildGotFocus()
{
	if (multiselect) return; // Don't clear multi-selection!
	for(int i = 0; i < line.GetCount(); i++) {
		Item& m = item[line[i].itemi];
		if(m.ctrl && m.ctrl->HasFocusDeep()) {
			SetCursorLine(i);
			return;
		}
	}
}
but you could equally do this by using a sub-class of OptionTree with an empty ChildGotFocus function.


I am afraid this might not be consistent with interface behaviour e.g. in case there are EditFields in the TreeCtrl...

What makes me wonder, BTW, is how the Option gets the focus?!

Mirek
Re: Bug changing text after node insertion [message #16958 is a reply to message #16954] Wed, 23 July 2008 10:53 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
luzr wrote on Wed, 23 July 2008 09:10


Partial solution is to not use Option's Label (leave it empty) and put its text to Node's Value (haha, back at it again Smile. Then clicking the option box will toggle the option, clicking the text will do selections.

You have to do it like this anyway, otherwise the Option obscures the highlight rect.

Quote:

I am afraid this might not be consistent with interface behaviour e.g. in case there are EditFields in the TreeCtrl...

To be honest I think it makes as much sense as anything else in that situation, and it will only change behaviour when using multiselect and ctrls.

The existing way, where the current selection is cleared whenever a ctrl gets focus is broken. For instance, currently the selection is cleared if focus changes to another window then back again.
Quote:


What makes me wonder, BTW, is how the Option gets the focus?!

The sequence is:
LeftDown
DoClick
SetCursorLine
SetWantFocus on the ctrl
ChildGotFocus
SetCursorLine
SelectOne (obviously clears any other selected items)

Perhaps a better solution would be to stop the first CursorLine being called when using CTRL-key and multiselect, but the behaviour is definitely wrong.
Re: Bug changing text after node insertion [message #16963 is a reply to message #16958] Wed, 23 July 2008 13:45 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
Well mrjt solution works as he said it would. Thank you! I don't need multiselect, so I guess we can leave ChildGotFocus as is.

I actually need the option to change it's checked status only when I click the small rectangle to the left, not the entire region of the control.

Quote:

Partial solution is to not use Option's Label (leave it empty) and put its text to Node's Value (haha, back at it again . Then clicking the option box will toggle the option, clicking the text will do selections.

I'm not going back to that again Smile.

I'll leave it as it is for now, because there are other strange behaviors that I didn't find a reason for yet. Getting the changed checked status of a item in the OptionTree that is not checked doesn't seem to work only after it has been changed. I'll investigate these and if they'll look like a bug, I'll post about them. I hope they are just some mistake of mine.
Re: Bug changing text after node insertion [message #16969 is a reply to message #16958] Wed, 23 July 2008 22:03 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
BTW, perhaps just another solution would be to have kind of Option that manages all selections itself...

However, I guess we need some refactoring in TreeCtrl to solve these issues...

Mirek
Re: Bug changing text after node insertion [message #17006 is a reply to message #16963] Thu, 24 July 2008 22:44 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
cbpporter wrote on Wed, 23 July 2008 14:45


I'll leave it as it is for now, because there are other strange behaviors that I didn't find a reason for yet. Getting the changed checked status of a item in the OptionTree that is not checked doesn't seem to work only after it has been changed. I'll investigate these and if they'll look like a bug, I'll post about them. I hope they are just some mistake of mine.

False alarm, it was my fault. My old friend: initialized class members... I wish C++ would warn me about this one. Or maybe we could add it later to the new C++ parser.

cbpporter wrote on Wed, 23 July 2008 14:45


I'm not going back to that again Smile.


Well I did and after a lot of work I pretty much got what I wanted. There are still some display issues, like strange background color and unaligned focus rect, but I can fix those. Still, this is almost the most (unnecessarily) complicated part of the whole program Sad.

But for it to work as expected, one of the previous fixes must be reverted:
TreeCtrl::Node::Node(const Image& img, Ctrl& ctrl, int cx, int cy)
{
	Init();
	SetCtrl(ctrl);
	image = img;
	size = Null;
	if(cx > 0)
		size.cx = cx;
	if(cy > 0)
		size.cy = cy;
}

With this fix, there is that huge cap between Option (which now has no text) and text displayed by tree. If we undo it, they will be side by side again.
Re: Bug changing text after node insertion [message #19010 is a reply to message #17006] Wed, 05 November 2008 10:07 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Thu, 24 July 2008 16:44


False alarm, it was my fault. My old friend: initialized class members...



Hehe, I always do the same mistake too.

In fact, I really would not be sorry if C++ default initialized to 0...

Quote:


TreeCtrl::Node::Node(const Image& img, Ctrl& ctrl, int cx, int cy)
{
	Init();
	SetCtrl(ctrl);
	image = img;
	size = Null;
	if(cx > 0)
		size.cx = cx;
	if(cy > 0)
		size.cy = cy;
}


If we undo it, they will be side by side again.



Ehm, and what is the correct version then? Smile

Mirek
Re: Bug changing text after node insertion [message #19014 is a reply to message #19010] Wed, 05 November 2008 20:43 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
Quote:


Ehm, and what is the correct version then? Smile
Mirek


TreeCtrl::Node::Node(const Image& img, Ctrl& ctrl, int cx, int cy)
{
	Init();
	SetCtrl(ctrl);
	image = img;
	size = ctrl.GetMinSize();
	if(cx > 0)
		size.cx = cx;
	if(cy > 0)
		size.cy = cy;
}



I must say, I'm completelly confused. I've given up on this issue being fixed. Yet you brought it up after 3 months. Do you have some kind of special stack to handle issues or something?
Re: Bug changing text after node insertion [message #19159 is a reply to message #19014] Sat, 15 November 2008 20:42 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1428
Registered: September 2007
Ultimate Contributor
Could you please confirm if it is OK to apply this patch? If not, I'll just modify it locally. It's not like I don't have about 20 minor modifications that I must apply to 2008.1 to get my apps to either compile or work correctly Smile. They don't compile under Linux Razz.
Re: Bug changing text after node insertion [message #19371 is a reply to message #19014] Sat, 29 November 2008 13:17 Go to previous message
mirek is currently offline  mirek
Messages: 14290
Registered: November 2005
Ultimate Member
cbpporter wrote on Wed, 05 November 2008 14:43

I must say, I'm completelly confused. I've given up on this issue being fixed. Yet you brought it up after 3 months. Do you have some kind of special stack to handle issues or something?


I am sorry, I guess I just clicked wrong topic, have not checked the date of post, then was confused with the patch...

Well, just to be sure: TreeCtrl in svn is OK now?

Mirek
Previous Topic: IsSelected(id)
Next Topic: Clear() and external controls as nodes
Goto Forum:
  


Current Time: Sun Apr 26 16:27:11 GMT+2 2026

Total time taken to generate the page: 0.01134 seconds