if(Checked)
{
//draw toggled
}
else if(!Checked)
{
//don't draw toggled
}
The ComboBox class dosn't have Checked and I wasn't sure what the property was to say its been pressed ect. Does any one know it?
[.net] ComboBox 'checked'
I have a checkbox user control and have made a ComboBox based on the same code (partly). The problem occurs when I have:
If(CB.SelectedIndex!=-1)
or
If(CB.SelectedItem!=null)
these are the cases, when there is something (an item in the list) selected in the combobox.
I suggest creating a new control:
class myComboBox : ComboBox
{
Bool Checked
{
get
{
return CB.SelectedItem!=null;
}
}
}
or
If(CB.SelectedItem!=null)
these are the cases, when there is something (an item in the list) selected in the combobox.
I suggest creating a new control:
class myComboBox : ComboBox
{
Bool Checked
{
get
{
return CB.SelectedItem!=null;
}
}
}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement