c# - Combobox of toolstrip doesn't have selected value -


i try put combobox in toolstrip menu .i put doesn't have selectedvalue!!!why ?

enter image description here

but when put standard combobox has .

enter image description here

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

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -