| View previous topic :: View next topic |
| Author |
Message |
pkutter
Joined: 18 Mar 2009 Posts: 17 Location: Minnesota, USA
|
Posted: Mon May 11, 2009 3:48 pm Post subject: Is there a way to create a contextual menu? |
|
|
I've looked through the help file and searched the forum, but can't find a way to create a contextual menu. It looks like just about all of the other gui functions are available. Is it called something else?
I have a list view that I would like to be able to right click on and execute one of several run commands based on the list view item that I right clicked on.
I'm currently using a list view and buttons at the bottom to accomplish the same thing, but I may be adding many more buttons, and I think it would be cleaner with a contextual menu.
Thanks,
Pete |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5044 Location: the tunnel(?=light)
|
|
| Back to top |
|
 |
Drugwash
Joined: 07 Sep 2008 Posts: 921 Location: Ploiesti, RO
|
Posted: Mon May 11, 2009 4:09 pm Post subject: |
|
|
See here, please.
This one can also be used when ~RButton is set as hotkey to invoke the menu.
May be others too - check the script showcase.
Perfect timing, sinkfaze!  |
|
| Back to top |
|
 |
Solar
Joined: 03 May 2009 Posts: 345 Location: OH, USA
|
Posted: Mon May 11, 2009 5:56 pm Post subject: |
|
|
| Quote: | | GuiContextMenu: Launched whenever the user right-clicks anywhere in the window except the title bar and menu bar. It is also launched in response to pressing the Apps key or Shift-F10. |
| Code: | Menu, Context, Add
Return
GuiContextMenu:
If A_GuiControl = MyListView ; if the name of the variable assosiated with the Gui control that launched the thread is "MyListView"
Menu, Context, Show ; show the context menu that should have been created previously (as shown above)
Return |
|
|
| Back to top |
|
 |
pkutter
Joined: 18 Mar 2009 Posts: 17 Location: Minnesota, USA
|
Posted: Mon May 11, 2009 8:41 pm Post subject: |
|
|
Thanks for all of the replies. Ah, the difference between searching for context and contextual... I suppose I should have tried that.
Thanks,
Pete |
|
| Back to top |
|
 |
|