JeromeB Posted March 10, 2012 Share Posted March 10, 2012 Hey, I have some trouble to get this working. What i'm trying to do is something like this : expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 375, 180, -1, -1) GUICtrlSetResizing(-1, $GUI_DOCKALL) $Button1 = GUICtrlCreateButton("OK", 16, 48, 75, 25) GUICtrlSetResizing(-1, $GUI_DOCKALL) $Input1 = GUICtrlCreateInput("", 16, 16, 121, 21) GUICtrlSetResizing(-1, $GUI_DOCKALL) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 248, 16, 81, 17) GUICtrlSetResizing(-1, $GUI_DOCKALL) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 248, 48, 81, 17) GUICtrlSetResizing(-1, $GUI_DOCKALL) $Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 248, 80, 81, 17) GUICtrlSetResizing(-1, $GUI_DOCKALL) $Radio1 = GUICtrlCreateRadio("Radio1", 16, 128, 65, 17) GUICtrlSetResizing(-1, $GUI_DOCKALL) $Radio2 = GUICtrlCreateRadio("Radio2", 88, 128, 65, 17) GUICtrlSetResizing(-1, $GUI_DOCKALL) $Radio3 = GUICtrlCreateRadio("Radio3", 176, 128, 65, 17) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $Size = WinGetPos($Form1) WinMove ( $Form1, "", $Size[0], $Size[1], 190, 125, 1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $i = 190 To 350 WinMove ( $Form1, "", $Size[0], $Size[1], $i, 125, 1 ) Next For $i = 125 To 200 WinMove ( $Form1, "", $Size[0], $Size[1], 350, $i, 1 ) Next EndSwitch WEnd The things is, i want to have at beggining the complete full GUI, and when i press start, it resize it per the left (mean left get resize), to finaly only have the checkbox. Is that possible, and how thanks guys Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 10, 2012 Moderators Share Posted March 10, 2012 JeromeB,Not as easy as you think as you will have to move all the controls as well as resizing the GUI - very CPU intensive. Have you looked at the GuiExtender UDF in my sig? Although not quite what you have here, it might help in your project. 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...
JeromeB Posted March 10, 2012 Author Share Posted March 10, 2012 Ha, thats was what i'm thinked. Any way, is there is an easy possibility to do that per the right. I mean, take my exemple with full GUI, and then resize to only keep button Maybe a dumb question but i cant get it work xD Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 10, 2012 Moderators Share Posted March 10, 2012 JeromeB, Did you look at my UDF? 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...
JeromeB Posted March 10, 2012 Author Share Posted March 10, 2012 (edited) Yup I have test some exemple, but i like the effect given by the winmove. Is this is possible with it ? edit : Testing your idf atm, i like it but, i dont find the way to resize on horizontal way, only vertical using $iCode_Section = _GUIExtender_Section_Start(0, 40) _GUIExtender_Section_Action($iCode_Section) Edited March 10, 2012 by JeromeB Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 10, 2012 Moderators Share Posted March 10, 2012 JeromeB, I mean, take my exemple with full GUI, and then resize to only keep buttonThat is easy, just reverse the expansion: expandcollapse popup#include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIResizeMode", $GUI_DOCKALL) $Form1 = GUICreate("Form1", 375, 180, -1, -1) $Button1 = GUICtrlCreateButton("Bigger", 16, 48, 75, 25) $Input1 = GUICtrlCreateInput("", 16, 16, 121, 21) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 248, 16, 81, 17) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 248, 48, 81, 17) $Checkbox3 = GUICtrlCreateCheckbox("Checkbox3", 248, 80, 81, 17) $Radio1 = GUICtrlCreateRadio("Radio1", 16, 128, 65, 17) $Radio2 = GUICtrlCreateRadio("Radio2", 88, 128, 65, 17) $Radio3 = GUICtrlCreateRadio("Radio3", 176, 128, 65, 17) GUISetState(@SW_SHOW) $Size = WinGetPos($Form1) WinMove ( $Form1, "", $Size[0], $Size[1], 190, 125, 1) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Switch GUICtrlRead($Button1) Case "Bigger" For $i = 190 To 350 WinMove ( $Form1, "", $Size[0], $Size[1], $i, 125, 1 ) Next For $i = 125 To 200 WinMove ( $Form1, "", $Size[0], $Size[1], 350, $i, 1 ) Next GUICtrlSetData($Button1, "Smaller") Case "Smaller" For $i = 200 To 125 Step -1 WinMove ( $Form1, "", $Size[0], $Size[1], 350, $i, 1 ) Next For $i = 350 To 190 Step -1 WinMove ( $Form1, "", $Size[0], $Size[1], $i, 125, 1 ) Next GUICtrlSetData($Button1, "Bigger") EndSwitch EndSwitch WEnd 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...
JeromeB Posted March 10, 2012 Author Share Posted March 10, 2012 Ty Melba23, What About your UDF ? I like it, but i do not find the way to retract on x. Only on y... Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 10, 2012 Moderators Share Posted March 10, 2012 JeromeB,It only works in one orientation - either vertically or horizontally. That is why you have the $iOrient parameter in the _GUIExtender_Init call to set the one you want: _GUIExtender_Init($hWnd, $iOrient = 0, $iFixed = 0)I did try to make in work in both directions, but it got too difficult. One day perhaps.....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...
JeromeB Posted March 10, 2012 Author Share Posted March 10, 2012 Thank you for your precisous help Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 10, 2012 Moderators Share Posted March 10, 2012 JeromeB, Il n'y a pas de quoi. 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...
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