Jump to content
Sign in to follow this  

Gui Tab resizing

Recommended Posts

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.


Share this post

Link to post
Share on other sites

#include <GuiConstants.au3>

$hWnd = GuiCreate("My Gui")

$hTab1 = GUICtrlCreateTab(2,2,390,390)
$hTabItem1 = GUICtrlCreateTabItem("Basic")
$hTabItem2 = GUICtrlCreateTabItem("Advanced")


$pos = WinGetPos($hWnd)

While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    If $msg = $hTab1 Then
        If GUICtrlRead($hTab1) = 0 Then
        ElseIf GuiCtrlRead($hTab1) = 1 Then

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...