Sign in to follow this  
Followers 0
JohnBailey

Tab within a Tab

6 posts in this topic

I want to do a tab inside of a tab. So, I want one tab that takes the user to one place while allowing for child/sub tabs. How do I do this action? I tried it and it doesn't seem to work


A decision is a powerful thing

Share this post


Link to post
Share on other sites



per help

ONLY one Tab control can be created by window. But a script can creates several windows having a tab in.

so, you can create child windows to do what you want

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Hi,

#include <GUIConstants.au3>

$Main_Gui = GUICreate("My GUI Tab", 500, 500)  ; will create a dialog box that when displayed is centered
$Child_Gui = GUICreate("Child Gui", 480, 460, 15, 35, BitOR($WS_CHILD, $WS_TABSTOP), -1, $Main_Gui)

$child_tab = GUICtrlCreateTab(10, 10, 470, 450)
$c_tab0 = GUICtrlCreateTabItem("c_tab0")
$button = GUICtrlCreateButton("test button", 20, 40, 120, 25)
$c_tab1 = GUICtrlCreateTabItem("c_tab1")
GUICtrlCreateTabItem("")   ; end tabitem definition

GUISwitch($Main_Gui)

GUISetBkColor(0x00E0FFFF)
GUISetFont(9, 300)

$tab = GUICtrlCreateTab(10, 10, 490, 490)

$tab0 = GUICtrlCreateTabItem("tab0")
GUICtrlCreateLabel("label0", 30, 80, 50, 20)
$tab0OK = GUICtrlCreateButton("OK0", 20, 50, 50, 20)
$tab0input = GUICtrlCreateInput("default", 80, 50, 70, 20)

$tab1 = GUICtrlCreateTabItem("tab----1")
GUICtrlCreateLabel("label1", 30, 80, 50, 20)
$tab1combo = GUICtrlCreateCombo("", 20, 50, 60, 120)
GUICtrlSetData(-1, "Trids|CyberSlug|Larry|Jon|Tylo", "Jon") ; default Jon
$tab1OK = GUICtrlCreateButton("OK1", 80, 50, 50, 20)

$tab2 = GUICtrlCreateTabItem("tab2")
GUICtrlSetState(-1, $GUI_SHOW)   ; will be display first
GUICtrlCreateLabel("label2", 30, 80, 50, 20)
$tab2OK = GUICtrlCreateButton("OK2", 140, 50, 50)

$tab3 = GUICtrlCreateTabItem("tab3")

GUICtrlCreateTabItem("")   ; end tabitem definition


GUISetState()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $tab
            If GUICtrlRead($tab) = 3 Then
                GUISetState(@SW_SHOW, $Child_Gui)
            Else
                GUISetState(@SW_HIDE, $Child_Gui)
            EndIf
    EndSelect
   
WEnd

So long,

Mega

P.S.: See Tab 3


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Nice one, Mega!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Nice one, Mega!!

8)

Hi,

Thanks! Did that a while ago for somebody in the German Forum.

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

th.meger AWESOME! Thank you! I was disappoint that I could do what you did! I'm going to look through the script and figure out how you did everything. I really appreciate it! Learning time --->>


A decision is a powerful thing

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  
Followers 0