Jump to content
Sign in to follow this  

Functions for one tab only?

Recommended Posts


Im a bit new to AutoIt, and have done a fair share of research into this question before asking.

I have two tabs in my script

$TAB1 = GuiCtrlCreateTab (THIS IS TAB1)

$TAB2 = GuiCtrlCreateTab (THIS IS TAB2)

When applying a function in the script that has GuiCtrlCreateGroup, it makes the group for both tabs.

Is there a way to specify the GuiCtrlCreateGroup to only apply to one tab and not the GuiCreate window?



Share this post

Link to post
Share on other sites

Pretty please :-)

You mean like this? (I got the help for GuiCtrlCreateGroup and then I added $tabSystem, $tab1 and $tab2. Are you sure you first used GUICtrlCreateTab to create the tab system, and then actually created actual tabs with GUICtrlCreateTabItem? Seems to work for me...)

#include <GUIConstants.au3>

GUICreate("My GUI group") ; will create a dialog box that when displayed is centered

$tabSystem = GUICtrlCreateTab(1,1,400,400)
$tab1 = GUICtrlCreateTabItem("tab 1")
$tab2 = GUICtrlCreateTabItem("tab 2")

GUICtrlCreateGroup ("Group 1", 190, 60, 90, 140)
$radio_1 = GUICtrlCreateRadio ("Radio 1", 210, 90, 50, 20)
$radio_2 = GUICtrlCreateRadio ("Radio 2", 210, 110, 60, 50)
GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

GUISetState ()    ; will display an empty dialog box

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop

/edit: forgot to put code in autoit tags.

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post

Link to post
Share on other sites

The tab variable works great, but like I said.

When you apply a GuiCtrlCreateGroup statement to a function, when the function is called, it applies that group to all tabs.

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...