Merchants Posted November 4, 2010 Share Posted November 4, 2010 how to extend a win? not moveing it$GUI = GUICreate("test123", 150, 100) Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 4, 2010 Share Posted November 4, 2010 Just for fun... $hGUI = GUICreate("test123", 150, 100) $idButton = GUICtrlCreateButton("Grow!", 25, 35, 100, 30) GUISetState() While 1 Switch GUIGetMsg() Case -3 ; $GUI_EVENT_CLOSE Exit Case $idButton $aWinPos = WinGetPos($hGUI) WinMove($hGUI, "", $aWinPos[0], $aWinPos[1], $aWinPos[2], $aWinPos[3] + 10) EndSwitch WEnd 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...
Moderators Melba23 Posted November 4, 2010 Moderators Share Posted November 4, 2010 Merchants,You might also want to check out the GUIExtender UDF in my sig. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 4, 2010 Share Posted November 4, 2010 (edited) Just for fun... $hGUI = GUICreate("test123", 150, 100) $idButton = GUICtrlCreateButton("Grow!", 25, 35, 100, 30) GUISetState() While 1 Switch GUIGetMsg() Case -3 ; $GUI_EVENT_CLOSE Exit Case $idButton $aWinPos = WinGetPos($hGUI) WinMove($hGUI, "", $aWinPos[0], $aWinPos[1], $aWinPos[2], $aWinPos[3] + 10) EndSwitch WEnd Uhmm... Jon? Edit: Well, when I quoted the other post it was all scrambled up, now it's not. I'm so confused! Edited November 4, 2010 by PsaltyDS 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...
Merchants Posted November 4, 2010 Author Share Posted November 4, 2010 (edited) there is a problem with the controls if you extend it. the controls wil move to it must stay there it is only 6 controls if you press Alt+a then you can see where the extender is for expandcollapse popup;You online ? #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> HotKeySet("!a","Add_text") HotKeySet("!z","Extend") Global $GUI[6], $Number = 0, $msg, $text[51] $GUI[0] = GUICreate("test text?", 150, 100) $GUI[4] = GUICtrlCreateLabel("Number of text:", 5, 5) GUICtrlCreateLabel("message to send:", 5, 20, 90, 14) GUICtrlCreateLabel("text:", 5, 55) $GUI[3] = GuiCtrlCreateInput("test", 4, 35, 142, 18) $GUI[2] = GUICtrlCreateLabel("", 0, 69, 150, 30000, 0x01) $GUI[1] = GUICtrlCreateLabel($Number, 95, 6, 7, 11) GUISetStyle($WS_CAPTION, $WS_BORDER) GUISetState() While 1 $GUI[5] = GUIGetMsg($GUI[0]) Select Case $GUI[5] = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func Add_text() If $Number = 50 Then MsgBox(48,"Number of text","max 50 text!") Else $Number += 1 $text[$Number] = "test" $msg &= $text[$Number] & @CRLF GUICtrlSetData($GUI[1], $Number) GUICtrlSetData($GUI[2], $msg) EndIf EndFunc Func Extend() $pos = WinGetPos($GUI[0]) WinMove($GUI[0], "", Default, Default, $pos[2], $pos[3] + 10) EndFunc Edited November 4, 2010 by Merchants Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 4, 2010 Share Posted November 4, 2010 (edited) The controls move because the have the default resizing mode. You can prevent that with GUICtrlSetResizing(), using $GUI_DOCKALL mode for individual controls. Or change the default with Opt("GUIResizeMode", $GUI_DOCKALL) before creating the controls. See help file. Edited November 4, 2010 by PsaltyDS 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...
Merchants Posted November 4, 2010 Author Share Posted November 4, 2010 thx this works 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