Sign in to follow this  
Followers 0
Djordhan

Hide Tab Control's tab..

4 posts in this topic

Hello,

Is there a way to hide the tab at the top of the tab control ?

I would like to switch tabs using other buttons in the UI. I know you can make the tabs looks like buttons but I want my buttons somewhere else.

Or if you know any other way to have multiple sets of controls in the same UI and hide/show them whit buttons it's fine too :huh2:

Thanks a lot!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello,

Is there a way to hide the tab at the top of the tab control ?

I would like to switch tabs using other buttons in the UI. I know you can make the tabs looks like buttons but I want my buttons somewhere else.

Or if you know any other way to have multiple sets of controls in the same UI and hide/show them whit buttons it's fine too :huh2:

Thanks a lot!

You can use child windows. Create all the controls for one set on one child windows like this

#include <WindowsConstants.au3>

$hG = GUICreate("")
$but1 = GUICtrlCreateButton("Set 11",20,20)
$but2 = GUICtrlCreateButton("set2",200,20)
$hCh1 = GUICreate("",200,200,100,100,$WS_CHILD,-1,$hG);child window with parent as $hG
GUICtrlCreateLabel("I'm on set 1",20,50)
GUISetState()

$hCh2 = GUICreate("",200,200,100,100,$WS_CHILD,-1,$hG);child window with parent as $hG
GUICtrlCreateLabel("I'm on set 2",40,80)
GUISwitch($hG)
GUISetState()


while 1
    switch GUIGetMsg()
        case -3
            Exit
        case $but1
            GUISetState(@SW_HIDE,$hCh2)
            GUISetState(@SW_SHOW,$hCh1)
            case $but2
            GUISetState(@SW_HIDE,$hCh1)
            GUISetState(@SW_SHOW,$hCh2)
    EndSwitch
WEnd

Or, if you want to have a tab with hidden tabs then simply put the tabcontrol on a child window and set the top to be minus some valu so the tabs are above the top of the cjild window and then they will be hidden.

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

This should do the work thank you!!

I never worked with child windows, looking at your code I assume that labels are added to the latest GUI you created right ? So the order of creation is very important in that case I guess ?

Share this post


Link to post
Share on other sites

This should do the work thank you!!

I never worked with child windows, looking at your code I assume that labels are added to the latest GUI you created right ? So the order of creation is very important in that case I guess ?

Yes, the controls created are on the last gui created or on the gui you switch to using GuiSwitch.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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