octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #44801] Removing a context menu


From: Guillaume
Subject: [Octave-bug-tracker] [bug #44801] Removing a context menu
Date: Sat, 11 Apr 2015 11:12:43 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

Follow-up Comment #4, bug #44801 (project octave):

Thanks for looking into this - I was especially not aware of the usage of NaN
in this particular setting.

I was also at first thinking that "set(F,'uicontextmenu',[])" was not a thing
to do but, actually, this is and should be valid and has a useful role if you
don't want to delete a uicontextmenu but just remove it temporarily and reuse
it later on:


% By default, uicontextmenu is []
F = figure;
get(F,'uicontextmenu')

% add a uicontextmenu
c = uicontextmenu;
m = uimenu('parent',c,'label','menu');
set(F,'uicontextmenu',c);

% detach the context menu
set(F,'uicontextmenu',NaN); % [] in MATLAB

% re-attach the context menu
set(F,'uicontextmenu',c);


Unfortunately NaN works with Octave and not MATLAB, while [] works with MATLAB
and not Octave.

Also flagging that there might be a link between this discussion and bug
#44763.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44801>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]