the3gwireless Posted September 5, 2007 Share Posted September 5, 2007 Do I have to use absolute coordinate? Some thing like this: GUICtrlCreateLabel ( "text", left, top, width , height ) Thanks in advance! Sam Link to comment Share on other sites More sharing options...
Zedna Posted September 5, 2007 Share Posted September 5, 2007 use GUICtrlCreateLabel() with style = $SS_CENTER and width of label = width of whole parent window Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 5, 2007 Share Posted September 5, 2007 Do I have to use absolute coordinate? Some thing like this: GUICtrlCreateLabel ( "text", left, top, width , height ) Thanks in advance! Sam If Zedna's solution isn't right for you, then yes, you will have to do the math, but it's not hard. If your GUI's width is already in a variable you're almost done. If not, then get it with WinGetPos() ([2] = width in the returned array). $avWinPos = WinGetPos($hGUI) $W = 150, $H = 20, $X = ($avWinPos[2] - $W) / 2, $Y = ($avWinPos[3] - $H) /2 GuiCtrlCreateLabel("text", $X, $Y, $W, $H) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now