1. I created a listbox style uicontrol object that has many entries.
2.Then I associated a uicontextmenu with the listbox. The uicontextmenu is available by right-clicking on the first few listbox items.
3. However, I am unable to obtain the uicontextmenu by right-clicking on listbox items that are not initially displayed in the figure. This is illustrated by executing the following commands:
d=uimenu;c = uicontextmenu;set(d,'Parent',c)p=uicontrol('style','listbox','position',[0 0 100 40],'string','one|two|three|four|five|six')set(p,'uicontextmenu',c)
Best Answer