Context menu for a button

Is it possible to create/assign a context menu for a button?
I made some buttons as shortcuts to some folders, but sometimes I like to open the folder in a new tab and sometimes in the current one. Now I have menu buttons for the folders I want so I get an option to open the folder in a new tab if I use the menu, but I have to maintain the action (folder locations) on two places per button and they take up more space than a regular button.

I also tried the favorites list which does show a context menu per favorite (not always the folder one) but all the favorites are displayed as text and that takes up even more space than a menu button.

You can control what happens when you press the button with qualifiers. I believe that will do what you want. Sample code:

@set dir = "/profile\Downloads" go {$dir} KEYARGS "none:newtab=findexisting" "shift:new nodual" "ctrl:openindual newtab=findexisting"
This opens my Downloads folder in a new tab by default or a new lister with Shift or in Dual with Ctrl.

Regards, AB

Thanks, I'll give that a try... I'm a real mouse oriented person though...

[quote]I'm a real mouse oriented person though...[/quote]Put your commands in 3-way buttons. They will also work from inside a menu.

Yeah, using a "three-button" is probably best for what you want. Then left, right and middle clicks can do different things.

The three button works great.
Thanks guys...

Any +1 for three-buttons in context menus - lol?

What a great idea, but they should also show the tooltips.
+1 from me. :smiley:

Ah yeah - you'd want that... but then, three-button buttons are able to show the Label if no Tip is specified on the child buttons, so presumably you could get that in three-button context menu entries without needing to add an explicit "Tip" field where there is currently none...

I don't think this will be realized as since DO10 the first I've noticed in default config is going away from 2+ buttons to behave like most win programs (see all the pulldown buttons now in default toolbar instead of 3-way-buttons).

I've converted all my Pulldown buttons to 2-way buttons containing a menu on RMB. It's more comfortable to get the menu with a Rightclick than to leftclick the very small area at the pulldown buttons and needs less space on the toolbar.
If I remember it right I've learned this trick from...Steje. :smiley: Thanks for that.

Woot!

:slight_smile: