Outline-local Menus?

11 views
Skip to first unread message

tbp1...@gmail.com

unread,
May 12, 2022, 11:20:28 PM5/12/22
to leo-editor
Is there a way to have a custom menu that appears only on one outline?  I know how to set up a custom menu in myLeoSettings.leo.  But if I try the same method in an outline, either the menu appears on all subsequently-opened outlines, or it does not appear at all, depending on whether it was defined in an @settings tree or not.

So far I've been making do with @button nodes, which are fine, but sometimes there get to be too many buttons and I'd like to get all the commands into a menu instead.  Some of these commands only make sense in the context of a specific outline or two.

jkn

unread,
May 13, 2022, 11:11:04 AM5/13/22
to leo-editor
FWIW I have vaguely wondered the same...

Jacob Peck

unread,
May 13, 2022, 3:36:17 PM5/13/22
to Leo-editor Group
@button nodes can have @rclick child nodes, which add a context menu to the button they create.  Just in case you didn't know :)

I don't know of a way to make outline-local menus, however.

On Thu, May 12, 2022 at 11:20 PM tbp1...@gmail.com <tbp1...@gmail.com> wrote:
Is there a way to have a custom menu that appears only on one outline?  I know how to set up a custom menu in myLeoSettings.leo.  But if I try the same method in an outline, either the menu appears on all subsequently-opened outlines, or it does not appear at all, depending on whether it was defined in an @settings tree or not.

So far I've been making do with @button nodes, which are fine, but sometimes there get to be too many buttons and I'd like to get all the commands into a menu instead.  Some of these commands only make sense in the context of a specific outline or two.

--
You received this message because you are subscribed to the Google Groups "leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/b2ba16f8-c871-4343-bfb0-7bb0432a573en%40googlegroups.com.

Edward K. Ream

unread,
May 13, 2022, 3:39:24 PM5/13/22
to leo-editor
On Fri, May 13, 2022 at 2:36 PM Jacob Peck <gates...@gmail.com> wrote:
@button nodes can have @rclick child nodes, which add a context menu to the button they create.  Just in case you didn't know :)

I don't know of a way to make outline-local menus, however.

I don't think I know either :-) I do remember that there is some pretty hacky code involved in handling @menus and @menu.

Edward
Reply all
Reply to author
Forward
0 new messages