Sign in to follow this  
Followers 0
jlorenz1

Creation of a Tab control in a Tab control possible?

4 posts in this topic

#1 ·  Posted (edited)

Is it possible to create a Tab control in first instance and in of his Tabitem an another Tab control?

Background is: I want to create a programm with one "Page" for each function. If the user choice another function, all buttons of the old function will be disappearing. Unfortunately one "page" (tab item" contains another tab control. So that it doesn't work

#include <GUIConstants.au3>

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

GUISetBkColor(0x00E0FFFF)

GUISetFont(9, 300)

$tab=GUICtrlCreateTab (10,10, 200,100)

$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,40)

GUICtrlSetData(-1,"Trids|CyberSlug|Larry|Jon|Tylo", "Jon") ; default Jon

$tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20)

$tab2=GUICtrlCreateTabitem ("tab with tab")

GUICtrlSetState(-1,$GUI_SHOW) ; will be display first

GUICtrlCreateLabel ("label2", 30,80,50,20)

$tab2OK=GUICtrlCreateButton ("OK2", 140,50,50)

$tab=GUICtrlCreateTab (30,30, 150,70)

$tab0=GUICtrlCreateTabitem ("tabtab0")

GUICtrlCreateLabel ("label0", 30,80,50,20)

$tab0OK=GUICtrlCreateButton ("OK0", 20,50,50,20)

$tab0input=GUICtrlCreateInput ("default", 80,50,70,20)

$tab1=GUICtrlCreateTabitem ( "tabtab----1")

GUICtrlCreateLabel ("label1", 30,80,50,20)

$tab1combo=GUICtrlCreateCombo ("", 20,50,60,40)

GUICtrlSetData(-1,"Idi Amin|Honecker|Larry|Jon|Tylo", "Honecker") ; default Jon

$tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20)

GUICtrlCreateTabitem ("") ; end tabitem definition

GUICtrlCreateTabitem ("") ; end tabitem definition

GUICtrlCreateLabel ("label3", 20,130,50,20)

GUISetState ()

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

Thanks in advance

Johanes from Germany

Edited by jlorenz1

Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

search the forum for "Nested Tabs"

I wrote an example that differs from Holger's in that the tab control does get added to the tab item(via a child window embedded into a label control, sized to match the tabitem's client area)

EDIT:: found it

http://www.autoitscript.com/forum/index.ph...wtopic=13934&hl=

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Thanks for your great help I will try it. Johannes


Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

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