Burgaud Posted July 30, 2021 Share Posted July 30, 2021 This is an example TAB Gui wherein I added a sizing ability to the window expandcollapse popup#include <GUIConstantsEx.au3> Example() Func Example() GUICreate("My GUI Tab", -1, -1, -1, -1, 0x00040000) ; will create a dialog box that when displayed is centered GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) GUICtrlCreateTab(10, 10, 200, 100) GUICtrlCreateTabItem("tab0") GUICtrlCreateLabel("label0", 30, 80, 50, 20) GUICtrlCreateButton("OK0", 20, 50, 50, 20) GUICtrlCreateInput("default", 80, 50, 70, 20) local $this = GUICtrlCreateTabItem("tab----1") GUICtrlCreateLabel("label1", 30, 80, 50, 20) GUICtrlCreateCombo("", 20, 50, 60, 120) GUICtrlSetData(-1, "Trids|CyberSlug|Larry|Jon|Tylo|guinness", "Jon") ; default Jon GUICtrlCreateButton("OK1", 80, 50, 50, 20) GUICtrlCreateTabItem("tab2") GUICtrlSetState(-1, $GUI_SHOW) ; will be display first GUICtrlCreateLabel("label2", 30, 80, 50, 20) GUICtrlCreateButton("OK2", 140, 50, 50) GUICtrlCreateTabItem("") ; end tabitem definition GUICtrlCreateLabel("label3", 20, 130, 50, 20) GUISetState(@SW_SHOW) GUICtrlSetData($this," ssssssssssss ") Local $idMsg ; Loop until the user exits. While 1 $idMsg = GUIGetMsg() If $idMsg = $GUI_EVENT_CLOSE Then ExitLoop WEnd EndFunc ;==>Example Whenever I resize the window, elements inside it no longer maintain their designated coordinates. AutoIt Window Info does not have this problem. Assume I have a function _ResizeWindow() that is called everyime the window is resized. What should I do to relocate the tab properly? Link to comment Share on other sites More sharing options...
Subz Posted July 30, 2021 Share Posted July 30, 2021 (edited) You can use GuiResizeMode to stop the controls moving for example: Opt("GUIResizeMode", 802) You can also use GUICtrlSetResizing to change specific controls resizing. Edited July 31, 2021 by Subz Burgaud 1 Link to comment Share on other sites More sharing options...
Zedna Posted August 11, 2021 Share Posted August 11, 2021 As Subz said: Opt("GUIResizeMode", $GUI_DOCKALL) GUICreate("My GUI Tab", -1, -1, -1, -1, 0x00040000) ; will create a dialog box that when displayed is centered ... Resources UDF ResourcesEx UDF AutoIt Forum Search 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