Dynamic menu button / Custom dynamic button

I don't think this doable right now, if it is, please point me in the right direction.

The idea would be to be able to build dynamic custom menu buttons through scripting, e.g. a script command that, once put in a menu and called, would build the content of the menu (commands, sub-menus, ...).

This would require a new property to the script Func property (menu_items ?) which could be built dynamically with (at least) either buttons or menus (a menu could then include itself buttons or menus ...).
A button would have some properties like icon, label and command, menus would probably not have the command (unless it's possible to build MenuButtons).

That pattern could be extended to fit the principle of the built-in existing dynamic buttons (tab group list, drive list, ...). It could be a property of the "menu" to be displayed as a menu or as a dynamic button or act differently if put in a button or in a menu.

So far, the next best thing that I think is doable, is what has been shared by @galaxyhub in this post where you build a menu from standard dialog, but it misses the standard look & feel of menu, does not offer icon for the commands, and don't seem to offer sub-level menus.

I understand this could be quite heavy in terms of development (new properties to existing objects, new objects, probably some side effects I did not think of, ...).
Do you think it's something that could be doable in the future or did you already thought about it and dropped it for some reason ?
Thanks !

The main issue would be performance, but it's an idea we've been thinking about for a while.

2 Likes

I see ... especially if the dynamic building involves reading many icons (potentially in large formats) and many entries and/or sub-levels ...
So I understand that in the near future, this will probably remain on the whish list at least for a while ! :slight_smile:
Thanks for the quick answer as always !

1 Like

adjustable opaqeness and blurriness please.

Are you in the right thread? :slight_smile:

Awesome script menus ? :thinking:

The thread is about giving scripts a way to generate dynamic lists of buttons, similar to the internal commands that put your favorites, or a list of drives, or a list of saved layouts, and so on, into a menu or toolbar where you place the command. Those place things in the standard toolbars and menus.

It's not about scripts that show custom pop-up menus/UIs. (I think scripts already have some control over opacity with dialogs they create; not sure about pop-up menus.)