Jump to content

Menu columns


Achilles
 Share

Recommended Posts

#include <GUIConstants.au3>
GuiCreate("")
$a = GuiCtrlCreateMenu("Hey world")
GUICtrlCreateMenuitem("This is supposed to be here                   34", $a)
GUICtrlCreateMenuitem("This isn't supposed to be here               21", $a)
GUICtrlCreateMenuitem("This is not  supposed to be here            1", $a)
GUICtrlCreateMenuitem("This is supposed to fly                            2", $a)
Guisetstate()
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE

Is there a way I could organize the stuff on the right to make it aligned? In my real script I'm making a list of controls such as Ctrl + E or Ctrl + S and it looks horrible when it's not aligned...

Edited by Piano_Man
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

#include <GUIConstants.au3>
GuiCreate("")
$a = GuiCtrlCreateMenu("Hey world")
GUICtrlCreateMenuitem("This is supposed to be here                   34", $a)
GUICtrlCreateMenuitem("This isn't supposed to be here               21", $a)
GUICtrlCreateMenuitem("This is not  supposed to be here            1", $a)
GUICtrlCreateMenuitem("This is supposed to fly                            2", $a)
Guisetstate()
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE

Is there a way I could organize the stuff on the right to make it aligned? In my real script I'm making a list of controls such as Ctrl + E or Ctrl + S and it looks horrible when it's not aligned...

I think you need 2 paces for each letter. So You have to align the stuff by tabbing and then add 2 spaces for each letter missing in the shortest texts

tab 34

tab 21

tab space space 1

tab space space 2

#include <GUIConstants.au3>
GuiCreate("")
$a = GuiCtrlCreateMenu("Hey world")
GUICtrlCreateMenuitem("This is supposed to be here                  34", $a)
GUICtrlCreateMenuitem("This isn't supposed to be here               21", $a)
GUICtrlCreateMenuitem("This is not  supposed to be here             1", $a)
GUICtrlCreateMenuitem("This is supposed to fly                      2", $a)
Guisetstate()
Do
    $msg = GUIGetMsg()
Until $msg = $GUI_EVENT_CLOSE
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...