the3gwireless 0 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 Share this post Link to post Share on other sites
Zedna 288 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 Share this post Link to post Share on other sites
PsaltyDS 41 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 Share this post Link to post Share on other sites