Sign in to follow this  
Followers 0
YellowLab

Menu Text with Tabs

3 posts in this topic

#1 ·  Posted (edited)

Quick question for menu creation:

How do you tab over in order to add a text description for the assigned hot key?

For instance:

Open       Ctrl+O
Save       Ctrl+S

I guess I could trial and error it with spaces, but was wondering if there was a better way.

BTW "Tab" and @Tab don't work.

Thanks,

Bob

Edit: Strikethrough based on reply below.

Edited by YellowLab

You can't see a rainbow without first experiencing the rain.

Share this post


Link to post
Share on other sites



Maybe like this:

#include <GUIConstantsEx.au3>#include <WindowsConstants.au3>


#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 454, 192, 114)
$MenuItem2 = GUICtrlCreateMenu("MenuItem2")
$MenuItem4 = GUICtrlCreateMenuItem("aaa bbb" & @TAB & "Ctrl+A", $MenuItem2)
$MenuItem3 = GUICtrlCreateMenuItem("bb" & @TAB & "Ctrl+B", $MenuItem2)
$MenuItem1 = GUICtrlCreateMenu("MenuItem1")
GUISetState(@SW_SHOW)
Dim $Form1_AccelTable[1][2] = [["^a", $MenuItem4]]
GUISetAccelerators($Form1_AccelTable)
#EndRegion ### END Koda GUI section ###

While 1
 $nMsg = GUIGetMsg()
 Switch $nMsg
    Case $GUI_EVENT_CLOSE
        Exit

 EndSwitch
WEnd

Share this post


Link to post
Share on other sites

Thanks, I guess that does work. I tried it and it didn't work, but then reimplemented it in my code and it worked fine.

Thanks again,

Bob


You can't see a rainbow without first experiencing the rain.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0