lundi 12 janvier 2015

how to prevent uimenu (MATLAB) from disappearing when checked

I have added uicontextmenu to the line object. uicontextmenu includes 3 checkboxes. whenever i check any of them uicontextmenu disappears. i want uicontextmenu visible for sometime so that i can check multiple boxes and see the change (same as a button group but in uicontextmenu). is there any solution to this or some other approach?



cmenu=uicontextmenu;
set(he,'uicontextmenu',cmenu);
item1=uimenu(cmenu,'label','Data A','checked','off','callback',@func_a);
item2=uimenu(cmenu,'label','Data B','checked','off','callback',@func_b);
item3=uimenu(cmenu,'label','Data C','checked','off','callback',@func_c);


basically, he is the line object created by plot(x,y) and func_a, func_b, func_c are function to convert property 'checked' to on|off.





Aucun commentaire:

Enregistrer un commentaire