c# - Using A ContextMenuStrip On A ComboBox -


update:

it seems works fine in different way imagined would. if create simple project combobox1 , contextmenustrip1 use settings show in image below display context menu created in text area of dropdown fine. expected show dropdown menu in list area (with list items) of dropdown.

dropdown sampledropdown sample menudropdown sample menu fail

note: goal here context menu ("remove item") show on top of list item (such "test2").


i don't know why i'm getting hung on trivial has stumped me bit now. i'm doing stupid , can't see i'm doing wrong. goal simple... via design gui, create combobox object , contextmenustrip object. want contextmenustrip object pop when right click on combobox.

i thought creating combobox object choosing correct contextmenustrip object on contextmenustrip property work. seems there more it.

what doing wrong?

context menu example

this not easy seems. because created dropdownlist native listbox window created dynamically. access listbox have send "cb_getcomboboxinfo" in dropdown event.

the best way derive system.windows.forms.combobox described here: .net possible have contextmenu on item of combobox?

a more precise answer located here on msdn forum. gives example well.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -