Jump to content

How to create multi layered Tabs


 Share

Recommended Posts

i want to create tabs that is multi layered. i'm trying to create it but tabs just appeared on the right and i have to scroll it for me to see the tab. what i want is to create 2 tabs with some tabitems on it. how will i do that.

so far i have this code but it seems to be not working.

$tabs = GUICtrlCreateTab(5, 0, 390, 250, $TCS_MULTILINE, $TCS_FIXEDWIDTH)
$tab2 = GUICtrlCreateTab(5, 50, 390, 250, $TCS_MULTILINE, $TCS_FIXEDWIDTH )
Link to comment
Share on other sites

i want to create tabs that is multi layered. i'm trying to create it but tabs just appeared on the right and i have to scroll it for me to see the tab. what i want is to create 2 tabs with some tabitems on it. how will i do that.

so far i have this code but it seems to be not working.

$tabs = GUICtrlCreateTab(5, 0, 390, 250, $TCS_MULTILINE, $TCS_FIXEDWIDTH)
$tab2 = GUICtrlCreateTab(5, 50, 390, 250, $TCS_MULTILINE, $TCS_FIXEDWIDTH )
I haven't tried any work-arounds yet, but the help file under GuiCtrlCreateTab() says:

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

:)
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

@JohnRichard...Not sure if this helps but try this...

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


$Main_GUI = GUICreate("Main Gui", 600, 250)

$child_Left = GUICreate("Child Left", 250, 200, 30, 10, BitOR($WS_CHILD, $WS_TABSTOP), -1, $Main_GUI)

$tab = GUICtrlCreateTab(0, 0, 250, 200)
$tab_item = GUICtrlCreateTabItem("tabitem1")
$button = GUICtrlCreateButton("button1", 20, 50, 120, 25)
$tab_item2 = GUICtrlCreateTabItem("tabitem2")
$button2 = GUICtrlCreateButton("button2", 20, 50, 120, 25)
$tab_item3 = GUICtrlCreateTabItem("tabitem3")
$button3 = GUICtrlCreateButton("button3", 20, 50, 120, 25)
GUICtrlCreateTabItem("")

GUISwitch($Main_GUI)

$child_Right = GUICreate("Child Left", 250, 250, 320, 10, BitOR($WS_CHILD, $WS_TABSTOP), -1, $Main_GUI)
$tab2 = GUICtrlCreateTab(0, 0, 250, 200)
$tab2_item = GUICtrlCreateTabItem("tabitem1")
$button4 = GUICtrlCreateButton("button4", 20, 50, 120, 25)
$tab2_item2 = GUICtrlCreateTabItem("tabitem2")
$button5 = GUICtrlCreateButton("button5", 20, 50, 120, 25)
$tab2_item3 = GUICtrlCreateTabItem("tabitem3")
$button6 = GUICtrlCreateButton("button6", 20, 50, 120, 25)
GUICtrlCreateTabItem("")

GUISwitch($Main_GUI)
$btn_exit = GUICtrlCreateButton("Exit", 240, 220, 120, 25)

GUISetState(@SW_SHOW, $Main_GUI)
GUISetState(@SW_SHOW, $child_Left)
GUISetState(@SW_SHOW, $child_Right)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $btn_exit, $GUI_EVENT_CLOSE
            Exit
            
        Case $button    
            MsgBox(4096,"","$button")
            
                    Case $button2   
            MsgBox(4096,"","$button2")
            
                    Case $button6   
            MsgBox(4096,"","$button6")
    EndSwitch
WEnd

:)

Edited by DjDeep00
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...