Jump to content

How to hide the Tab Control's default tab item button?


jedliu
 Share

Recommended Posts

I have a couple of questions about the tab control.

Please check the following example code, I have checked the helpfile but I am afraid I haven't gotten it.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Form1", 426, 297, 196, 128)
$hide_label = GUICtrlCreateLabel("", 104, 8, 300, 36)
$Tab1 = GUICtrlCreateTab(112, 24, 289, 193)
;GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
GUICtrlCreateLabel("I'm in TabSheet 1", 144, 106, 200, 50)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
GUICtrlCreateLabel("I'm in TabSheet 2", 144, 106, 200, 50)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
GUICtrlCreateLabel("I'm in TabSheet 3", 144, 106, 200, 50)
GUICtrlCreateTabItem("")
$btn_TabSheet1 = GUICtrlCreateButton("TabSheet1", 16, 64, 75, 25)
$btn_TabSheet2 = GUICtrlCreateButton("TabSheet2", 16, 104, 75, 25)
$btn_TabSheet3 = GUICtrlCreateButton("TabSheet3", 16, 144, 75, 25)
$Checkbox1 = GUICtrlCreateCheckbox("show the default tab buttons", 32, 240, 241, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $btn_TabSheet1
            GUICtrlSetState($TabSheet1, $GUI_SHOW)
        Case $btn_TabSheet2
            GUICtrlSetState($TabSheet2, $GUI_SHOW)
        Case $btn_TabSheet3
            GUICtrlSetState($TabSheet3, $GUI_SHOW)
        Case $Checkbox1
            If GUICtrlGetState($hide_label) = 96 Then
                GUICtrlSetState($hide_label, $GUI_SHOW)
            Else
                GUICtrlSetState($hide_label, $GUI_HIDE)
            EndIf
    EndSwitch
WEnd

Here are my questions:

1. I put a label control to cover the tab buttons. Is there way to hide them by styles or something else?

PS: I want to use the buttons to switch the tab selected, so I want to hide the default tab item buttons.

2. How to switch the tab? here I use

GUICtrlSetState($TabSheet3, $GUI_SHOW)
, I am not sure whether this is correct.

3. When I try to switch the state of the label control, I use this code at the beginning

If GUICtrlGetState($hide_label) = $GUI_SHOW Then
    GUICtrlSetState($hide_label, $GUI_SHOW)
Else
    GUICtrlSetState($hide_label, $GUI_HIDE)
EndIf

but it can't work and then I changed to the following. How this come? I can't understand this.

If GUICtrlGetState($hide_label) = 96 Then
    GUICtrlSetState($hide_label, $GUI_SHOW)
Else
    GUICtrlSetState($hide_label, $GUI_HIDE)
EndIf

Thanks!

Edited by jedliu
Link to comment
Share on other sites

Here are my questions:

1. I put a label control to cover the tab buttons. Is there way to hide them by styles or something else?

PS: I want to use the buttons to switch the tab selected, so I want to hide the default tab item buttons.

No.

2. How to switch the tab? here I use

GUICtrlSetState($TabSheet3, $GUI_SHOW)
, I am not sure whether this is correct.
Looks fine to me, but see _GUICtrlTab_ClickTab in GuiTab.au3

3. When I try to switch the state of the label control, I use this code at the beginning

If GUICtrlGetState($hide_label) = $GUI_SHOW Then
     GUICtrlSetState($hide_label, $GUI_SHOW)
 Else
     GUICtrlSetState($hide_label, $GUI_HIDE)
 EndIf
If you want to find the hidden state of the control you must remember that the state will include a combination of all the states. So to see if a control is hidden see the change I made to your code below. I think the line I inserted and commented out is more logical though.

I also added another label because I thought it was neater, but it's just me meddling.

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Form1", 426, 297, 196, 128)
$hide_label = GUICtrlCreateLabel("", 104, 8, 300, 38)
$hide_label2 = GUICtrlCreateLabel("",112,46,287,1)
GUICtrlSetBkColor(-1,0x888888)
$Tab1 = GUICtrlCreateTab(112, 24, 289, 193)
;GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
ConsoleWrite("show = " & $GUI_SHOW & @CRLF)
ConsoleWrite("Hide = " & $GUI_HIDE & @CRLF)

$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
GUICtrlCreateLabel("I'm in TabSheet 1", 144, 106, 200, 50)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
GUICtrlCreateLabel("I'm in TabSheet 2", 144, 106, 200, 50)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
GUICtrlCreateLabel("I'm in TabSheet 3", 144, 106, 200, 50)
GUICtrlCreateTabItem("")
$btn_TabSheet1 = GUICtrlCreateButton("TabSheet1", 16, 64, 75, 25)
$btn_TabSheet2 = GUICtrlCreateButton("TabSheet2", 16, 104, 75, 25)
$btn_TabSheet3 = GUICtrlCreateButton("TabSheet3", 16, 144, 75, 25)
$Checkbox1 = GUICtrlCreateCheckbox("show the default tab buttons", 32, 240, 241, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $btn_TabSheet1
            GUICtrlSetState($TabSheet1, $GUI_SHOW)
        Case $btn_TabSheet2
            GUICtrlSetState($TabSheet2, $GUI_SHOW)
        Case $btn_TabSheet3
            GUICtrlSetState($TabSheet3, $GUI_SHOW)
        Case $Checkbox1
           ;If GUICtrlRead($Checkbox1) <> $GUI_CHECKED Then;I prefer this
            If BitAnd(GUICtrlGetState($hide_label),$GUI_HIDE) = $GUI_HIDE Then; to this
                GUICtrlSetState($hide_label, $GUI_SHOW)
                GUICtrlSetState($hide_label2, $GUI_SHOW)
            Else
                GUICtrlSetState($hide_label, $GUI_HIDE)
                GUICtrlSetState($hide_label2, $GUI_HIDE)
            EndIf
    EndSwitch
WEnd
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.
Link to comment
Share on other sites

@martin

Thanks for your reply.

You add the $hide_label2, that's nice, it make the tab looks better. Thanks.

Re. the hidden state of the control, your code is more logical, I will use it.

Regards my first question, I hope there could be a solution as well. :)

Thanks to Martin!

Edited by jedliu
Link to comment
Share on other sites

Or maybe there is a some kind of container which I can put all the child controls in it.

When I hide the parent container, all the child controls in it hide as well. :)

I hope my explanation is clear. Thanks!

You could have a child window to hold the controls. That's how you deal with more than one tab control because you can only have one tab per window. A good example was done by aec here and you could change that to your requirements.

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.
Link to comment
Share on other sites

You could have a child window to hold the controls. That's how you deal with more than one tab control because you can only have one tab per window. A good example was done by aec here and you could change that to your requirements.

I have checked that post and I will test that code, seems it is great. Child window!

Thanks, Martin. I will post the last code here when it is finished.

Link to comment
Share on other sites

I have checked that post and I will test that code, seems it is great. Child window!

Thanks, Martin. I will post the last code here when it is finished.

You may also have a look at this Tab on Tab example: http://www.autoitscript.com/forum/index.ph...amp;hl=reinhard

Have a look on the func tabswitch and the hints from Martin to that.

That will it make real easy to keep the tabs under control.

Best regards, Reinhard

Link to comment
Share on other sites

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

#Region ### START Koda GUI section ### Form=
$main_GUI = GUICreate("Form1", 570, 292, 193, 125, BitOr($GUI_SS_DEFAULT_GUI,$WS_CLIPSIBLINGS))
$win_btn_1 = GUICtrlCreateButton("Window 1", 24, 40, 75, 25, 0)
$win_btn_2 = GUICtrlCreateButton("Window 2", 24, 80, 75, 25, 0)
GUISetState()

$child1 = GUICreate("", 600, 300, 0, 0,BitOr($WS_CHILD,$WS_TABSTOP),-1,$main_GUI)
$Group1_1 = GUICtrlCreateGroup("", 168, 16, 385, 257)
$Group2_1 = GUICtrlCreateGroup("Group 1", 240, 56, 169, 97)
$Label1 = GUICtrlCreateLabel("I am in window 1", 256, 88, 104, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState()

$child2 = GUICreate("", 600, 300, 0, 0,BitOr($WS_CHILD,$WS_TABSTOP),-1,$main_GUI)
$Group2_1 = GUICtrlCreateGroup("", 168, 16, 385, 257)
$Group2_2 = GUICtrlCreateGroup("Group 2", 240, 56, 169, 97)
$Label2 = GUICtrlCreateLabel("I am in window 2", 256, 88, 104, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)

GUISwitch($main_GUI)

#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $win_btn_1
            GUISetState(@SW_SHOW, $child1)
            GUISetState(@SW_HIDE, $child2)
        Case $win_btn_2
            GUISetState(@SW_HIDE, $child1)
            GUISetState(@SW_SHOW, $child2)
    EndSwitch
WEnd

This is use the child container. Works nice for me.

@ ReFran

Thanks for your offer of the link, I will check that too.

Thanks!

Link to comment
Share on other sites

  • 5 months later...

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

#Region ### START Koda GUI section ### Form=
$main_GUI = GUICreate("Form1", 570, 292, 193, 125, BitOr($GUI_SS_DEFAULT_GUI,$WS_CLIPSIBLINGS))
$win_btn_1 = GUICtrlCreateButton("Window 1", 24, 40, 75, 25, 0)
$win_btn_2 = GUICtrlCreateButton("Window 2", 24, 80, 75, 25, 0)
GUISetState()

$child1 = GUICreate("", 600, 300, 0, 0,BitOr($WS_CHILD,$WS_TABSTOP),-1,$main_GUI)
$Group1_1 = GUICtrlCreateGroup("", 168, 16, 385, 257)
$Group2_1 = GUICtrlCreateGroup("Group 1", 240, 56, 169, 97)
$Label1 = GUICtrlCreateLabel("I am in window 1", 256, 88, 104, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState()

$child2 = GUICreate("", 600, 300, 0, 0,BitOr($WS_CHILD,$WS_TABSTOP),-1,$main_GUI)
$Group2_1 = GUICtrlCreateGroup("", 168, 16, 385, 257)
$Group2_2 = GUICtrlCreateGroup("Group 2", 240, 56, 169, 97)
$Label2 = GUICtrlCreateLabel("I am in window 2", 256, 88, 104, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)

GUISwitch($main_GUI)

#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $win_btn_1
            GUISetState(@SW_SHOW, $child1)
            GUISetState(@SW_HIDE, $child2)
        Case $win_btn_2
            GUISetState(@SW_HIDE, $child1)
            GUISetState(@SW_SHOW, $child2)
    EndSwitch
WEnd

This is use the child container. Works nice for me.

@ ReFran

Thanks for your offer of the link, I will check that too.

Thanks!

when i try to use that i have probs i put a background pic and then i have pic in the group1 but the pic in group 1 dont come on top of the background pic.

Link to comment
Share on other sites

when i try to use that i have probs i put a background pic and then i have pic in the group1 but the pic in group 1 dont come on top of the background pic.

Can you give an example which shows your problem? With the pics too if possible.

It might help if you create the background pic after everything thing else, give it the style $WS_CLIPSIBLINGS and disable it. $WS_CLIPSIBLINGS only clips for controls already created up to that point, controls created later will be ignored.

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.
Link to comment
Share on other sites

im confused with this script why dose it need to create 2 groups in 1 GUICreate?

It doesn't need to. There is no reason I can see anyway. Try removing the outer group, I don't think anything will change.

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.
Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$main_GUI = GUICreate("Form1", 290, 194, 192, 107, BitOr($GUI_SS_DEFAULT_GUI,$WS_CLIPSIBLINGS))
$Pic2 = GUICtrlCreatePic("C:\Documents and Settings\Nathan\Desktop\complete\buttons\Main1.bmp", 14, 42, 65, 12, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Pic3 = GUICtrlCreatePic("C:\Documents and Settings\Nathan\Desktop\complete\buttons\Options.bmp", 80, 42, 65, 12, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Background = GUICtrlCreatePic("C:\Documents and Settings\Nathan\Desktop\complete\BG_Main.jpg", 0, 0, 289, 193, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)


$child1 = GUICreate("", 290, 194, 0, 0,BitOr($WS_CHILD,$WS_TABSTOP),-1,$main_GUI)
$Group1 = GUICtrlCreateGroup("Group1", 16, 48, 257, 97)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Nathan\Desktop\4.0 BETA\Pictures New\back.jpg", 16, 48, 257, 97)
$Label1 = GUICtrlCreateLabel("I am in window 1", 256, 88, 104, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState()

ok so the pic1 isnt going ontop of the background. Its only a ruf script i just added them pic to test it but the pic isnt going on top

Link to comment
Share on other sites

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$main_GUI = GUICreate("Form1", 290, 194, 192, 107, BitOr($GUI_SS_DEFAULT_GUI,$WS_CLIPSIBLINGS))
$Pic2 = GUICtrlCreatePic("C:\Documents and Settings\Nathan\Desktop\complete\buttons\Main1.bmp", 14, 42, 65, 12, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Pic3 = GUICtrlCreatePic("C:\Documents and Settings\Nathan\Desktop\complete\buttons\Options.bmp", 80, 42, 65, 12, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Background = GUICtrlCreatePic("C:\Documents and Settings\Nathan\Desktop\complete\BG_Main.jpg", 0, 0, 289, 193, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)


$child1 = GUICreate("", 290, 194, 0, 0,BitOr($WS_CHILD,$WS_TABSTOP),-1,$main_GUI)
$Group1 = GUICtrlCreateGroup("Group1", 16, 48, 257, 97)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Nathan\Desktop\4.0 BETA\Pictures New\back.jpg", 16, 48, 257, 97)
$Label1 = GUICtrlCreateLabel("I am in window 1", 256, 88, 104, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState()

ok so the pic1 isnt going ontop of the background. Its only a ruf script i just added them pic to test it but the pic isnt going on top

As I said, the order in which you do things is important for $WS_CLIPSIBLINGS. A child window is just another control.

I modified your example so that you can see what's happening but you will need to replace $Pic1 to $Pic4.

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$main_GUI = GUICreate("Form1", 290, 194, 192, 107, BitOR($GUI_SS_DEFAULT_GUI, $WS_CLIPSIBLINGS))


$child1 = GUICreate("", 200, 174, 90, 20, BitOR($WS_CHILD, $WS_TABSTOP), -1, $main_GUI)
$Group1 = GUICtrlCreateGroup("Group1", 16, 48, 257, 97)
$Pic1 = GUICtrlCreatePic($Pic1, 16, 48, 257, 97)
$Label1 = GUICtrlCreateLabel("I am in window 1", 256, 88, 104, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState()


GUISwitch($main_GUI)
$Pic2 = GUICtrlCreatePic($Pic2, 14, 42, 65, 12, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Pic3 = GUICtrlCreatePic($Pic3, 80, 42, 65, 12, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
$Background = GUICtrlCreatePic($pic4, 0, 0, 289, 193, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)

While GUIGetMsg() <> -3
WEnd
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.
Link to comment
Share on other sites

nah i cant get it working >_<

Does that mean you spilt your orange juice over the keyboard?

Please consider how anyone will be able to do anything from that post.

You absolutely must give information for people to work from.

Did you try my last example? It worked for me so I would expect it to work for you.

You could post what didn't work and descibe what happened and maybe give a screen shot of what happens.

Are you using Vista perhaps?

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.
Link to comment
Share on other sites

i found that this seems to work easier 4 me with what im doing. i will see how i go

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Form1", 426, 297, 196, 128)
$hide_label = GUICtrlCreateLabel("", 104, 8, 300, 38)
$hide_label2 = GUICtrlCreateLabel("",112,46,287,1)
GUICtrlSetBkColor(-1,0x888888)
$Tab1 = GUICtrlCreateTab(112, 24, 289, 193)
;GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
ConsoleWrite("show = " & $GUI_SHOW & @CRLF)
ConsoleWrite("Hide = " & $GUI_HIDE & @CRLF)

$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
GUICtrlCreateLabel("I'm in TabSheet 1", 144, 106, 200, 50)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
GUICtrlCreateLabel("I'm in TabSheet 2", 144, 106, 200, 50)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
GUICtrlCreateLabel("I'm in TabSheet 3", 144, 106, 200, 50)
GUICtrlCreateTabItem("")
$btn_TabSheet1 = GUICtrlCreateButton("TabSheet1", 16, 64, 75, 25)
$btn_TabSheet2 = GUICtrlCreateButton("TabSheet2", 16, 104, 75, 25)
$btn_TabSheet3 = GUICtrlCreateButton("TabSheet3", 16, 144, 75, 25)
$Checkbox1 = GUICtrlCreateCheckbox("show the default tab buttons", 32, 240, 241, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $btn_TabSheet1
            GUICtrlSetState($TabSheet1, $GUI_SHOW)
        Case $btn_TabSheet2
            GUICtrlSetState($TabSheet2, $GUI_SHOW)
        Case $btn_TabSheet3
            GUICtrlSetState($TabSheet3, $GUI_SHOW)
        Case $Checkbox1
           ;If GUICtrlRead($Checkbox1) <> $GUI_CHECKED Then;I prefer this
            If BitAnd(GUICtrlGetState($hide_label),$GUI_HIDE) = $GUI_HIDE Then; to this
                GUICtrlSetState($hide_label, $GUI_SHOW)
                GUICtrlSetState($hide_label2, $GUI_SHOW)
            Else
                GUICtrlSetState($hide_label, $GUI_HIDE)
                GUICtrlSetState($hide_label2, $GUI_HIDE)
            EndIf
    EndSwitch
WEnd
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...