F
fragget
Hiya-
I wrote a color combo box control that shows colors
in the drop down part of a combo box.
The control
works great, however, whenever I drag any of the controls
around on a form this control is on (the color control)
the following code gets added to the form the control
sits on.
this.comboBox1.Items.AddRange(new object[] {
"1",
"2",
"3",
"4",
"5"});
In my constructor of my color combo box I add 5 items to
the control. This problem seems to be corrolated to that
in some way.
When this code gets added and I run my app the control
fails do to an index out of bounds exception.
My question is. Why the the designer keep adding this code
and how can I fix this issue.
Thanks - fg
I wrote a color combo box control that shows colors
in the drop down part of a combo box.
The control
works great, however, whenever I drag any of the controls
around on a form this control is on (the color control)
the following code gets added to the form the control
sits on.
this.comboBox1.Items.AddRange(new object[] {
"1",
"2",
"3",
"4",
"5"});
In my constructor of my color combo box I add 5 items to
the control. This problem seems to be corrolated to that
in some way.
When this code gets added and I run my app the control
fails do to an index out of bounds exception.
My question is. Why the the designer keep adding this code
and how can I fix this issue.
Thanks - fg