Custom-only uimenu in figure

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom-only uimenu in figure

phofman
Hi,

please is it possible to have only custom-added uimenu items in the menu
bar of figure? I am trying to remove the default ones (File, Edit, Help)
while keeping the menu bar for my custom uimenu items, to no avail.
Either no menu bar, or menu bar with the default ones plus my added
custom items.

Thanks a lot for any info.

Best regards,

Pavel.


Reply | Threaded
Open this post in threaded view
|

Re: Custom-only uimenu in figure

mmuetzel
"Pavel Hofman" wrote:
> please is it possible to have only custom-added uimenu items in the menu
> bar of figure? I am trying to remove the default ones (File, Edit, Help)
> while keeping the menu bar for my custom uimenu items, to no avail.
> Either no menu bar, or menu bar with the default ones plus my added
> custom items.

Removing the default menu before adding new elements works for me:
hf = figure();
set(hf, 'menubar', 'none');
m1 = uimenu(hf, 'Label', 'Menu 1');
e1 = uimenu(m1, 'Label', 'Element 1');
e2 = uimenu(m1, 'Label', 'Element 2');

Markus


Reply | Threaded
Open this post in threaded view
|

Re: Custom-only uimenu in figure

mmuetzel
Am 11. Februar 2019 um 20:36 Uhr schrieb "pavel":

> > Am 11. Februar 2019 um 15:57 Uhr schrieb "Markus Mützel":
> >>
> >> Removing the default menu before adding new elements works for me:
> >> hf = figure();
> >> set(hf, 'menubar', 'none');
> >> m1 = uimenu(hf, 'Label', 'Menu 1');
> >> e1 = uimenu(m1, 'Label', 'Element 1');
> >> e2 = uimenu(m1, 'Label', 'Element 2');
>
> Thanks a lot for your example. My code was:
>
> fig = figure('menubar', 'none');
> adding uimenus....
>
> And it shows no menu bar at all.
>
> However, your version with set works great:
>
> fig = figure();
> set(fig, 'menubar', 'none');
> adding uimenus....
>
> I am running Octave 4.2.2, linux amd64.

I can see the same problem with Octave 4.2. Luckily, this seems to have been fixed for Octave 4.4.

Markus


Reply | Threaded
Open this post in threaded view
|

Re: Custom-only uimenu in figure

phofman
Hi Markus,

Dne 11. 02. 19 v 21:12 "Markus Mützel" napsal(a):
>
> I can see the same problem with Octave 4.2. Luckily, this seems to have been fixed for Octave 4.4.
>

Yeah, my version is a bit old, yet the latest one packaged for ubuntu. I
will have to try the newer flatpak version.

Thanks a lot for your help.

Best regards,

Pavel.