Page 1 of 1

ComboBox: strange behaviour when adding items

Posted: 29 Apr 2014, 17:27
by kritzelkratz
we are programmatically adding ComboBoxes to e.g. a StackPanel.
since noesisgui version 1.1.6 the items are displayed twice.
we narrowed it down to it being necessary that the items need to be added to the ComboBox before the ComboBox is added to e.g. the StackPanel.
but we need to fill the ComboBox after it has been added to the layout. which has worked before 1.1.6.
is this a bug, or did we do something wrong the whole time?

this doesn't work: (the combobox popup shows "test1 test2 test3 test1 test2 test3", but the combobox item count is 3)

StackPanel sp = FindName<StackPanel>("mainPanel");
ComboBox cb = new ComboBox();
sp.GetChildren().Add(cb);
cb.GetItems().Add("test1");
cb.GetItems().Add("test2");
cb.GetItems().Add("test3");

and this works: (the combobox popup shows "test1 test2 test3")

StackPanel sp = FindName<StackPanel>("mainPanel");
ComboBox cb = new ComboBox();
cb.GetItems().Add("test1");
cb.GetItems().Add("test2");
cb.GetItems().Add("test3");
sp.GetChildren().Add(cb);

Re: ComboBox: strange behaviour when adding items

Posted: 29 Apr 2014, 18:57
by sfernandez
This is totally a bug (I was able to reproduce it), please report it in the bugtracker. We will fix it for the next release, or provide you a hotfix as soon as possible.

Sorry for the inconvenience.

Re: ComboBox: strange behaviour when adding items

Posted: 30 Apr 2014, 11:30
by kritzelkratz
i reported the bug on the bugtracker.
a hotfix would be really really nice, of course. :)

Re: ComboBox: strange behaviour when adding items

Posted: 30 Apr 2014, 11:51
by sfernandez
Thanks, I'll notify you about the status of this issue in the bugtracker.

Re: ComboBox: strange behaviour when adding items

Posted: 05 May 2014, 16:34
by golgepapaz
Same thing happens with treeview items also. I had to delay going into 1.1.7 . Still using 1.1.5

Re: ComboBox: strange behaviour when adding items

Posted: 05 May 2014, 19:07
by sfernandez
We fixed this issue and will be solved for the next release.
Please take a look at your private messages, I sent you one a moment ago.