Sign in to follow this  
Followers 0
Tukata

Need Help - Align Items

9 posts in this topic

Hi,

I tried the Help but could not make it. Please someone write me simple script of right-aligned items in list, combo and menu.

Thank you very much

Tuk

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hey, look up the help file more closely:

http://www.autoitscript.com/autoit3/docs/a...x/GUIStyles.htm

Look for $BS_RIGHT under the control you have.

#)

EDIT: my mistake, there is no $BS_RIGHT option for lists, combos and menus.

Edited by nfwu

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hey, look up the help file more closely:

http://www.autoitscript.com/autoit3/docs/a...x/GUIStyles.htm

Look for $BS_RIGHT under the control you have.

#)

EDIT: my mistake, there is no $BS_RIGHT option for lists, combos and menus.

That would be $SS / $ES anyway for those.

Edit: You would want to open Help and look in the GUI Control Styles for the information you desire.

**Not sure if the menu works the same.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Thank you all. Being a Newbie I will really need a sample script of list box with few items align to right. Please someone help.

Thank you

Tuk

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

#include <GUIConstants.au3>

GUICreate("My GUI combo"); will create a dialog box that when displayed is centered

GUICtrlCreateCombo ("item1", 10,10,-1,-1,-1,$WS_EX_RIGHT ); create first item
GUICtrlSetData(-1,"item2|item3","item3"); add other item snd set a new default

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

#include <GUIConstants.au3>

GLOBAL $MESSAGE = "The following"
GUICreate("My GUI list"); will create a dialog box that when displayed is centered

$add=GUICtrlCreateButton ("Add", 64,32,75,25)
$clear=GUICtrlCreateButton ("Clear", 64,72,75,25)
$mylist=GUICtrlCreateList ("buttons", 176,32,121,97,-1,$WS_EX_RIGHT)
GUICtrlSetLimit(-1,200); to limit horizontal scrolling
GUICtrlSetData(-1,$MESSAGE)
$close=GUICtrlCreateButton ("my closing button", 64,160,175,25)

GUISetState ()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()

    Select
         case $msg = $add
        GUICtrlSetData($mylist,"You clicked button No1|")
         case $msg = $clear
        GUICtrlSetData($mylist,"")
         Case $msg = $close
            MsgBox(0,"", "the closing button has been clicked",2)
            Exit
    EndSelect
Wend
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

gafrost

Thanks. I still have the problem. I get message saying "Unable to open script file".

As far as I know all files are in place, I have last Beta. I compiled both scripts with Beta.

I am surely doing something wrong, most of the samples do not works for me. For example, I get error message on line 171 on "array.au3" even if it is not included in the project.

Please help.

Thank you

Tuk

Share this post


Link to post
Share on other sites

gafrost

Thanks. I still have the problem. I get message saying "Unable to open script file".

As far as I know all files are in place, I have last Beta. I compiled both scripts with Beta.

I am surely doing something wrong, most of the samples do not works for me. For example, I get error message on line 171 on "array.au3" even if it is not included in the project.

Please help.

Thank you

Tuk

Your turn to show some code, can't help with out it.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Your turn to show some code, can't help with out it.

I used your two codes above and got message "Unable to open script file".

Another example: I run "_GUICtrlListViewJustifyColumn.au3" and get message that there is error in "Array.au3" (???) which I don't see it is included in the script.

Also, I have downloaded many scripts from the forum and most don't work for me.

Thank you for your help

Tuk

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