Jump to content

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


jedliu
 Share

Recommended Posts

ok i think i worked it out i added GUICtrlSetState(-1, $GUI_ONTOP)

under the button

Maybe, but if you look at the modified version of your example below you will see there is a lot more wrong.

#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",  290, 194, 307, 136)
$Main_Tab = GUICtrlCreatePic(@ProgramFilesDir & "\AutoIt3\Examples\Gui\logo4.gif", 16, 42, 68, 12, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Options_Tab = GUICtrlCreatePic(@ProgramFilesDir & "\AutoIt3\Examples\Gui\logo4.gif", 80, 42, 68, 12, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))

$Tab1 = GUICtrlCreateTab(16, 55, 257, 90)
;GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
ConsoleWrite("show = " & $GUI_SHOW & @CRLF)
ConsoleWrite("Hide = " & $GUI_HIDE & @CRLF)

$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$btn_TabSheet1 = GUICtrlCreateButton("TabSheet1", 24, 56, 113, 25)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$btn_TabSheet2 = GUICtrlCreateButton("test2", 24, 86, 113, 25)
$TabSheet3 = GUICtrlCreateTabItem("TabSheet3")
GUICtrlCreateLabel("I'm in TabSheet 3", 144, 106, 200, 50)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)

GuiSwitch($Form1_1)
$Background = GUICtrlCreatePic(@ProgramFilesDir & "\AutoIt3\Examples\Gui\logo4.gif", 0, 0, 289, 193, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetState(-1,$GUI_DISABLE)
GUICtrlSetBkColor(-1,0x888888)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Main_Tab
            GUICtrlSetState($TabSheet1, $GUI_SHOW)
        Case $Options_Tab
            GUICtrlSetState($TabSheet2, $GUI_SHOW)
        Case $btn_TabSheet1
            MsgBox(1, "test", "hi")
    EndSwitch
WEnd

The order is important and disabling the background pic is important.

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

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...