c# - Combobox of toolstrip doesn't have selected value -
i try put combobox
in toolstrip
menu .i put doesn't have selectedvalue
!!!why ?
but when put standard combobox
has .
see msdn remarks here.
toolstripcombobox combobox optimized hosting in toolstrip. subset of hosted control's properties , events exposed @ toolstripcombobox level, underlying combobox control accessible through combobox property.
update:
get combobox control using toolstripcombobox1.combobox
property.
code example:
toolstripcombobox1.combobox.datasource = new object[] { "one", "two", "three" }; toolstripcombobox1.combobox.selectedindex = 2; string selvalue = toolstripcombobox1.combobox.selectedvalue.tostring(); // selvalue gets "three"
Comments
Post a Comment