Sign in to follow this  
Followers 0
botanic

Gui button help

2 posts in this topic

The Login Button is not showing up untill i mouseover it...

CODE
Local $Form1, $Input1, $Button1, $Button2

$Form1 = GUICreate("Auto Login Utiliy", 300, 175)

GUISetFont(9, 400, 0, "timesnewroman")

GUICtrlCreateLabel( "Please enter " & $USER &"'s password:", 16, 16)

GUICtrlSetFont(-1, 9, 400, 0, "timesnewroman")

$Input1 = GUICtrlCreateInput("", 16, 40, "", "", $ES_PASSWORD, $WS_EX_CLIENTEDGE )

GUICtrlSetFont(-1, 9, 400, 0, "timesnewroman")

$Button1 = GUICtrlCreateButton("LOGIN", 16, 140, 60)

GUICtrlSetFont(-1, 9, 400, 0, "timesnewroman")

GUISetState(@SW_SHOW)

GUICtrlCreateLabel("This will start MTGO, login and then start ProjectGremBotv1. Also if you become logged-out this will log you back in.", 16, 75, 200, 175)

GUICtrlSetFont(-1, 9, 400, 0, "timesnewroman")

$Button2 = GUICtrlCreateButton("EXIT", 104, 140)

GUICtrlSetFont(-1, 9, 400, 0, "timesnewroman")

GUISetState(@SW_SHOW)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

The label is way beyond the GUI's border and is also overlapping the Login-button.

So, change the label-height to something a little bit more reasonable such as 60px. If you're having

difficulties picturing how the controls's positions and sizes are compared to the others then you can

make this easier by using GUICtrlSetBkColor on them.

Also, since you're setting the default GUI-font with GUISetFont in the beginning it's not needed to

set the control's font to the exact same settings afterwards. Lastly, I would suggest you to next time

post your code using the autoit-tags instead since it's so much easier to read.

EDIT : "timesnewroman" -> "Times New Roman"

Edited by Helge

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