Stormgrade Posted February 3, 2015 Posted February 3, 2015 Thank you for your answer. The restore event work well, my green square keep his size GUISetOnEvent($GUI_EVENT_Restore, "_GUIExtender_Restore") But my red square disappeared again So After some search I wasn't using the right resource UDF, I've taken the Guinness's ressourcesEx UDF from >here Well with ResourcesEx it work like a charm here the complete script : expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Outfile=test.exe #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_File_Add=red.bmp, rt_bitmap, BMP_1, 0 #AutoIt3Wrapper_Res_File_Add=green.bmp, rt_bitmap, BMP_2, 0 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include "GUIExtender.au3" #include "ResourcesEx.au3" Opt("GUIOnEventMode", 1) Local $Button, $iThis_Section $hGUI = GUICreate("Vertical", 300, 170, 100, 100) GUISetOnEvent($GUI_EVENT_CLOSE, "On_Exit") GUISetOnEvent($GUI_EVENT_Restore, "_GUIExtender_Restore") _GUIExtender_Init($hGUI) $Section1 = _GUIExtender_Section_Start($hGUI, 0, 90) Global $IMGTest1 = GUICtrlCreatePic("", 15, 20, 18, 19) Global $Test1 = GUICtrlCreateLabel("Test1", 56, 20, 361, 24) Global $IMGTest2 = GUICtrlCreatePic("", 15, 50, 18, 19) Global $Test2 = GUICtrlCreateLabel("Test2", 56, 50, 361, 24) $Button = _GUIExtender_Section_Action($hGUI, 2, "", "", 50, 75, 175, 15, 0, 1) _GUIExtender_Section_End($hGUI) $Section2 = _GUIExtender_Section_Start($hGUI, 90, 80) $List1 = GUICtrlCreateList("", 10, 98, 280, 70) _GUIExtender_Section_End($hGUI) _GUIExtender_Section_Extend($hGUI, 0, False) GUISetState() Local $hBmp1 = _Resource_GetAsBitmap("BMP_1", $RT_BITMAP) Local $hBmp2 = _Resource_GetAsBitmap("BMP_2", $RT_BITMAP) _Resource_SetBitmapToCtrlID($IMGTest1, $hBmp1) _Resource_SetBitmapToCtrlID($IMGTest2, $hBmp1) Sleep(2000) Local $IP1 = "www.google.com" $result = WMI_Ping($IP1,32,false,0,true) If NOT @ERROR Then _Resource_SetBitmapToCtrlID($IMGTest1, $hBmp2) GUICtrlSetData($Test1,"Accès à " & $IP1 & " en " & $result & " ms") Else GUICtrlSetData($Test1,"Echec ping vers " & $IP1) EndIf Local $IP2 = "www.sdgbgwdfhg.com" $result = WMI_Ping($IP2,32,false,0,true) If NOT @ERROR Then _Resource_SetBitmapToCtrlID($IMGTest1, $hBmp2) GUICtrlSetData($Test2,"Accès à " & $IP2 & " en " & $result & " ms") Else GUICtrlSetData($Test2,"Echec ping vers " & $IP2) EndIf While 1 Sleep(100) WEnd Func WMI_Ping($sAddress = "127.0.0.1", $iBufferSize = 32, $bNoFragmentation = False, $iRecordRoute = 0, $bResolveAddressNames = False, $sSourceRoute = "") Local $colItems = "", $strComputer = "localhost", $strStatusCode = 0, $strResponseTime = 0, $Output = "" Local $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") Local $sQuery = "SELECT * FROM Win32_PingStatus WHERE " $sQuery &= "address = '" & $sAddress & "' " $sQuery &= "AND BufferSize = " & $iBufferSize & " " $sQuery &= "AND NoFragmentation = " & $bNoFragmentation & " " $sQuery &= "AND RecordRoute = " & $iRecordRoute & " " $sQuery &= "AND ResolveAddressNames = " & $bResolveAddressNames & " " $sQuery &= "AND SourceRoute = '" & $sSourceRoute & "'" $colItems = $objWMIService.ExecQuery($sQuery, "WQL", 0x10 + 0x20) If IsObj($colItems) Then ConsoleWrite("Object Name: " & ObjName($colItems) & @CRLF) For $objItem In $colItems $strResponseTime = $objItem.ResponseTime $strStatusCode = $objItem.StatusCode Next If $strStatusCode <> 0 Then Return SetError(1,0,$strStatusCode) Else Return $strResponseTime EndIf Else Return SetError(2,0,0) EndIf EndFunc ;==>WMI_Ping Func On_Exit() Exit EndFunc And thanks again for your help.
Moderators Melba23 Posted February 3, 2015 Author Moderators Posted February 3, 2015 Stormgrade,Glad you got it working. 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
Deye Posted March 20, 2015 Posted March 20, 2015 M23, Thanks for sharing this UDF I admit I couldn't find away to get this started even with the examples shown here so I really haven't got much with it for now, besides to show what i need it to do in this example: TIA #include <GUIConstantsEx.au3> #include "GUIExtender.au3" $hGUI = GUICreate("Parent GUI", 340, 370) _GUIExtender_Init($hGUI) $iThis_Section = _GUIExtender_Section_Start($hGUI, 0, 90) $Button = _GUIExtender_Section_Action($hGUI, $iThis_Section + 1, "", "", 208, 340, 115, 25, 0, 1) _GUIExtender_Section_End($hGUI) $Label1 = GUICtrlCreateLabel("first-section", 216, 48, 70, 19) $Input2 = GUICtrlCreateInput("first-section", 184, 68, 121, 21, 0, 1) $Button5 = GUICtrlCreateButton("first-section", 208, 296, 115, 25) $Radio1 = GUICtrlCreateRadio("middle-section", 170, 104, 89, 25) $Radio2 = GUICtrlCreateRadio("middle-section", 170, 136, 89, 25) $Radio3 = GUICtrlCreateRadio("middle-section", 170, 168 ,89, 25) $Button1 = GUICtrlCreateButton("middle-section", 35, 248, 80, 25) $Button2 = GUICtrlCreateButton("middle-section", 137, 248, 80, 25) $Button3 = GUICtrlCreateButton("middle-section", 239, 248, 80, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
Moderators Melba23 Posted March 20, 2015 Author Moderators Posted March 20, 2015 Deye,Try this and see if the fog clears: expandcollapse popup#include <GUIConstantsEx.au3> #include "GUIExtender.au3" $hGUI = GUICreate("Parent GUI", 340, 370) _GUIExtender_Init($hGUI) ; This section starts at 0 and is 90 pixels deep $iSection_1 = _GUIExtender_Section_Start($hGUI, 0, 90) ; So all controls must be in that area - especially the one which actions the second part $Button = _GUIExtender_Section_Action($hGUI, $iSection_1 + 1, "", "", 208, 10, 115, 25, 0, 1) $Label1 = GUICtrlCreateLabel("first-section", 216, 48, 70, 19) $Input2 = GUICtrlCreateInput("first-section", 184, 68, 121, 21, 0, 1) ; This one has been moved to keep it in the top section $Button5 = GUICtrlCreateButton("first-section", 8, 66, 115, 25) _GUIExtender_Section_End($hGUI) ; This section starts at 90 (where the first one stops) and is 210 pixels deep $iSection_2 = _GUIExtender_Section_Start($hGUI, 90, 210) ; And all these are in that section $Radio1 = GUICtrlCreateRadio("middle-section", 170, 104, 89, 25) $Radio2 = GUICtrlCreateRadio("middle-section", 170, 136, 89, 25) $Radio3 = GUICtrlCreateRadio("middle-section", 170, 168, 89, 25) $Button1 = GUICtrlCreateButton("middle-section", 35, 248, 80, 25) $Button2 = GUICtrlCreateButton("middle-section", 137, 248, 80, 25) $Button3 = GUICtrlCreateButton("middle-section", 239, 248, 80, 25) _GUIExtender_Section_End($hGUI) ; Your GUI is 370 pixels deep, so we need a further section to fill it _GUIExtender_Section_Start($hGUI, 300, 70) ; Just to show that it exists and it not actionable $Button4 = GUICtrlCreateButton("final-section", 10, 310, 80, 30) _GUIExtender_Section_End($hGUI) ; of course you could always set the GUI depth to 300 and omit the final section - your choice GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch ; Get the UDF to check for the action button firing _GUIExtender_Action($hGUI, $nMsg) WEndM23 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
Deye Posted March 24, 2015 Posted March 24, 2015 M23, I'm having hopefully a small bug situation here add to the middle section into the above example you have posted $StartTime_Dummy = GUICtrlCreateInput("0", 173, 215, 80, 25) $Updown1 = GUICtrlCreateUpdown($StartTime_Dummy) the control disappears upon retraction hope its an easy fix Thanks Deye
Moderators Melba23 Posted March 24, 2015 Author Moderators Posted March 24, 2015 (edited) Deye, That bug took a bit of finding. It seems that UpDowns do not like being hidden - which is what the UDF does to all controls during the extension/retraction phases to prevent any ghosting. When hidden, the UDF cannot get a position returned from the UpDown and so cannot relocate it correctly. > The solution is to keep the UpDown visible - but that introduces a possible execution time penalty because of the need to check all the controls to determine their type before hiding the non-UpDown ones (which is still needed). I have therefore added a new parameter to the _GUIExtender_Init function to indicate that there are "complex" controls in the GUI - if this flag is set then the UDF does the added check, if not then execution time is unaffected as all controls are hidden as before. This solution also has the advantage of being easily expandable to other control types were it needed. Please try this new Beta UDF and let me know if it works for you as well as it does for me: To save you the trouble of reading the new function header, you will need to use this initialisation line in your script: _GUIExtender_Init($hGUI, 0, 0, True) M23 Edited March 9, 2017 by Melba23 Beta code removed 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
Deye Posted March 24, 2015 Posted March 24, 2015 Excellent fix M23 glad you found the way. definitely works here Thanks Deye
Moderators Melba23 Posted March 24, 2015 Author Moderators Posted March 24, 2015 Deye,Excellent - I will release a new version soon. 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
Moderators Melba23 Posted March 30, 2015 Author Moderators Posted March 30, 2015 [New version] - 30 Mar 15Added: UpDown controls were not handled correctly as the UDF hides all controls during section retraction/extension to prevent ghosting - and UpDowns do not return a position when hidden. A new optional parameter has been added to the _GUIExtender_Init function - if you use UpDowns then you need to set this $bComplex parameter so that the UDF will check the type of each control and keep the UpDowns visible. If the parameter is not set (the default) then the UDF hides all controls as before to keep execution time to a minimum.Thanks to Deye for the report. New UDF and examples in first post. 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
SlavaS Posted July 8, 2015 Posted July 8, 2015 (edited) expandcollapse popup#include <GUIConstantsEx.au3> #include <IE.au3> #include "GUIExtender.au3" $hGUI = GUICreate("Test", 300, 390) $Button = GUICtrlCreateButton("Test", 10, 20, 70, 22) GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $Button _Child() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _Child() $hGUI_Child = GUICreate("Test", 250, 170) _GUIExtender_Init($hGUI_Child) _GUIExtender_Section_Start(0, 70) GUICtrlCreateGroup(" 1 - Static ", 10, 10, 230, 50) _GUIExtender_Section_Action(2, "", "", 180, 40, 50, 20) ; Normal button _GUIExtender_Section_End() _GUIExtender_Section_Start(70, 100) GUICtrlCreateGroup(" 2 - Extendable ", 10, 70, 230, 90) $oIE = _IECreateEmbedded() $hIE = GUICtrlCreateObj($oIE, 10, 70, 230, 90) _IENavigate($oIE, "about:blank") _GUIExtender_Obj_Data($hIE, $oIE) _GUIExtender_Section_End() GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE GUIDelete($hGUI_Child) _GUIExtender_Clear() ; If this is omitted, the script will crash when the child is created a second time Return EndSwitch _GUIExtender_Action($iMsg) ; Check for click on Action control WEnd EndFuncHello, when added to the gui child _GUIExtender_Obj_Data, error when re-opening the child"C: \ .... \ GUIExtender.au3" (523): ==> Subscript used on non-accessible variable .:ControlMove ($ aGUIExt_Section_Data [0] [3], "", $ iCID, $ aPos [0] + $ iGUI_Fixed, $ aPos [1])ControlMove ($ aGUIExt_Section_Data [0] [3], "", $ iCID, $ aPos ^ ERRORHelp my please. Edited July 8, 2015 by SlavaS
Moderators Melba23 Posted July 8, 2015 Author Moderators Posted July 8, 2015 (edited) SlavaS, Firstly you are using an old version of the UDF - I suggest updating to the latest release (you will need to update the syntax a little as shown in the example below). I can see why this happens. The imbedded object is not removed from the internal list when the GUI is deleted and so the UDF looks for the wrong handle when the GUI is recreated. I have rewritten the relevant parts of the UDF and produced a Beta version which works fine for me - can you test it too please. Here is your amended script: expandcollapse popup#include <GUIConstantsEx.au3> #include <IE.au3> #include "GUIExtender_Mod.au3" $hGUI = GUICreate("Test", 300, 390) $Button = GUICtrlCreateButton("Test", 10, 20, 70, 22) GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $Button _Child() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _Child() $hGUI_Child = GUICreate("Test", 250, 170) _GUIExtender_Init($hGUI_Child) _GUIExtender_Section_Start($hGUI_Child, 0, 70) GUICtrlCreateGroup(" 1 - Static ", 10, 10, 230, 50) _GUIExtender_Section_Action($hGUI_Child, 2, "", "", 180, 40, 50, 20) ; Normal button _GUIExtender_Section_End($hGUI_Child) _GUIExtender_Section_Start($hGUI_Child, 70, 100) GUICtrlCreateGroup(" 2 - Extendable ", 10, 70, 230, 90) $oIE = _IECreateEmbedded() $hIE = GUICtrlCreateObj($oIE, 10, 70, 230, 90) _IENavigate($oIE, "about:blank") _GUIExtender_Obj_Data($hIE, $oIE) _GUIExtender_Section_End($hGUI_Child) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE GUIDelete($hGUI_Child) _GUIExtender_Clear($hGUI_Child) ; If this is omitted, the script will crash when the child is created a second time Return EndSwitch _GUIExtender_Action($hGUI_Child, $iMsg) ; Check for click on Action control WEnd EndFunc And here is the Beta UDF: Finally, if I were coding this I would just create the child GUI once and then hide/show it as required - I much prefer that approach to multiple deletion/recreation cycles of an identical GUI. M23 Edited March 9, 2017 by Melba23 Beta code removed 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
Moderators Melba23 Posted July 13, 2015 Author Moderators Posted July 13, 2015 SlavaS,Does the modified UDF work for you? Please let me know so I can release a new version.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
SlavaS Posted July 16, 2015 Posted July 16, 2015 Does the modified UDF work for you? Please let me know so I can release a new version.yes it all right, thank you very much ))
Moderators Melba23 Posted July 16, 2015 Author Moderators Posted July 16, 2015 SlavaS,Excellent - I will release the new version later today. Thanks for the report and testing the result.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
Moderators Melba23 Posted July 16, 2015 Author Moderators Posted July 16, 2015 [Bugfix version] - 16 Jul 15Fixed: If the GUI contained an Object (such as an embedded IE browser) this was not removed from the internal UDF array when the GUI was destroyed - which meant any subsequently created GUIs containing objects used the wrong data.Thanks to SlavaS for the report.New UDF and examples in first post.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
Deye Posted December 19, 2015 Posted December 19, 2015 Hi Melba I'm looking for a way to get the current "extended" state whether its to be true or false on next runbut first I'm looking on how to start the gui in full extended mode i tried _GUIExtender_Action($hGUI, $Button) ;didn't workTIA
Moderators Melba23 Posted December 19, 2015 Author Moderators Posted December 19, 2015 Deye,Did you look through the function list?; #FUNCTION# ====================================== ; Name...........: _GUIExtender_Section_State ; Description ...: Returns current state of sectionThe GUI opens in with all sections extended by default - as you can see from the examples, you need to retract specific sections if required:_GUIExtender_Section_Extend($hGUI_1, 4, False) ; Section 4 retracted when GUI appears GUISetState()If you still have problems, post the code and I will take a look.M23 Deye 1 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
shai Posted August 10, 2016 Posted August 10, 2016 (edited) hi i try to use your UDF but the gui is disrupted after i click to Extend. this is my code: expandcollapse popup#include "GUIExtender.au3" $gui = GUICreate("test", 260, 220, -1, -1, BitOR (0x00C00000, 0x00080000), 0x400000) _GUIExtender_Init($gui) $iThis_Section = _GUIExtender_Section_Start($gui, 0, 100) GUICtrlCreateLabel("Test 1:", 10, 15, 60, 20) $con_status = GUICtrlCreateInput("", 70, 10, 70, 20, 2048) $con_type = GUICtrlCreateLabel("", 145, 15, 100, 20) GUICtrlCreateLabel("Test 2:", 10, 40, 60, 20) $curent_apn = GUICtrlCreateInput("", 70, 35, 70, 20, 2048) $connect = GUICtrlCreateButton("action 1", 10, 60, 100, 30, 0x0001) $disconnect = GUICtrlCreateButton("action 2", 160, 60, 90, 30) GUICtrlSetFont($connect, 10, 800) GUICtrlSetBkColor($connect, 0x9ACD32) GUICtrlSetFont($disconnect, 10, 800) GUICtrlSetBkColor($disconnect, 0xFF4500) _GUIExtender_Section_Action($gui, $iThis_Section + 1, "", "", 115, 80, 35, 15) _GUIExtender_Section_End($gui) $iMore_Section = _GUIExtender_Section_Start($gui, 100, 120) $setnativapn = GUICtrlCreateButton("action 3", 10, 100, 120, 30) $checkall = GUICtrlCreateButton("action 4", 140, 100, 110, 30) $delnativapn = GUICtrlCreateButton("action 5", 10, 140, 120, 30) $fixconsettings = GUICtrlCreateButton("action 6", 140, 140, 110, 30) $downloadcert = GUICtrlCreateButton("action 7", 10, 180, 120, 30) $downloadremote = GUICtrlCreateButton("action 8", 140, 180, 110, 30) _GUIExtender_Section_End($gui) _GUIExtender_Section_Extend($gui, 0, False) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case -3 Exit Case $checkall ConsoleWrite("$checkall" & @CRLF) Case $setnativapn ConsoleWrite("$setnativapn" & @CRLF) Case $delnativapn ConsoleWrite("$delnativapn" & @CRLF) Case $disconnect ConsoleWrite("$disconnect" & @CRLF) Case $connect ConsoleWrite("$connect" & @CRLF) Case $fixconsettings ConsoleWrite("$fixconsettings" & @CRLF) Case $downloadcert ConsoleWrite("$downloadcert" & @CRLF) Case $downloadremote ConsoleWrite("$downloadremote" & @CRLF) EndSwitch _GUIExtender_Action($gui, $nMsg) WEnd Edited August 10, 2016 by shai
Moderators Melba23 Posted August 11, 2016 Author Moderators Posted August 11, 2016 shai, That is the result of using the $WS_EX_LAYOUTRTL extended style on the GUI. I will take a look at how the UDF might cope with that. 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
shai Posted August 11, 2016 Posted August 11, 2016 1 hour ago, Melba23 said: shai, That is the result of using the $WS_EX_LAYOUTRTL extended style on the GUI. I will take a look at how the UDF might cope with that. M23 thanks
Recommended Posts