ttleser Posted January 25, 2008 Posted January 25, 2008 Is it possible to be able to click on a tab within a GUI window and have the GUI resize itself? Say you've got a Basic tab and an Advanced tab. When you open the program, the Basic tab is default and the gui is small, you click on the Advanced tab and the GUI expands.. I can figure out how to make the GUI expand by clicking on a button, but can't figure out how to do it based on clicking on the tab itself. Thoughts?
covaks Posted January 25, 2008 Posted January 25, 2008 #include <GuiConstants.au3> $hWnd = GuiCreate("My Gui") $hTab1 = GUICtrlCreateTab(2,2,390,390) $hTabItem1 = GUICtrlCreateTabItem("Basic") $hTabItem2 = GUICtrlCreateTabItem("Advanced") GUISetState() $pos = WinGetPos($hWnd) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $hTab1 Then If GUICtrlRead($hTab1) = 0 Then WinMove($hWnd,"",Default,Default,$pos[2],$pos[3]) ElseIf GuiCtrlRead($hTab1) = 1 Then WinMove($hWnd,"",Default,Default,600,600) EndIf EndIf WEnd
ttleser Posted January 25, 2008 Author Posted January 25, 2008 Exactly what I was looking for. Thanks much.
Emiel Wieldraaijer Posted January 26, 2008 Posted January 26, 2008 @covaks Good example Best regards,Emiel Wieldraaijer
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