E
Eirik
Hi,
I try to set the backcolor property of a NumericUpDown control on PocketPC,
but cannot seem to get it to work.
What I try to achieve is to set a diferent color when to control has focus.
Easy enough with TextBoxes, but I'm strugling with the NumericUpDown
control.
The code I try to use is something like this (I've tried different indexes
in the control collection) :
private void numKM_GotFocus(object sender, System.EventArgs e)
{
NumericUpDown ctrl = (NumericUpDown)sender;
ctrl.Controls[1].BackColor = colFocus;
}
What happens is I get a 'System.ArgumentOutOfrangeException'.
Debugging shows that the Controls collection has Count of 0 on the ctrl
object...?
Being a beginner, I'm stuck.
How do I change the backcolor of the TextBox in the NumericUpDown control?
Regards
I try to set the backcolor property of a NumericUpDown control on PocketPC,
but cannot seem to get it to work.
What I try to achieve is to set a diferent color when to control has focus.
Easy enough with TextBoxes, but I'm strugling with the NumericUpDown
control.
The code I try to use is something like this (I've tried different indexes
in the control collection) :
private void numKM_GotFocus(object sender, System.EventArgs e)
{
NumericUpDown ctrl = (NumericUpDown)sender;
ctrl.Controls[1].BackColor = colFocus;
}
What happens is I get a 'System.ArgumentOutOfrangeException'.
Debugging shows that the Controls collection has Count of 0 on the ctrl
object...?
Being a beginner, I'm stuck.
How do I change the backcolor of the TextBox in the NumericUpDown control?
Regards