Jump to content

Tabs


 Share

Recommended Posts

Is there anyway i can change the colour of tabs and the edge around them and the inner bit where whats in the tab goes?

thanks.

<{POST_SNAPBACK}>

as mentioned in the doc no the tabs line cannot be painted too much code

the label intabitem area can be painted

#include <GUIConstants.au3>
autoItSetOption("TrayIconDebug", 1)
; --------------------------------------------------------------
GUICreate("My GUI TAB color", 220, 160)
GuiSetBkColor (0x00E0FFFF)
GUISetFont (9, 300)

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

; TAB 0
$tab0=GUICtrlCreateTabitem ("tab#0")
; TAB 1
$tab1=GUICtrlCreateTabitem ("tab#1")
GuiCtrlSetState($tab1, 16); $GUI_SHOW
$lab1= GUICtrlCreateLabel (" Set me a color ", 92, 51, 90, 20)
$combo=GUICtrlCreateCombo ("", 20, 50, 70, 80)
GuiCtrlSetData (-1,"Red|Blue|Green")
$input1=GUICtrlCreateInput ("default", 20, 80,70,20)
GuiSetState (@SW_SHOW)

; Run the GUI until the dialog is closed or timeout
$start=TimerInit()
Do
$msg = GUIGetMsg()
if $msg <> 0 then $start=TimerInit()
if $msg>0 then
  If GUICtrlRead($combo) then
     $col= GUICtrlRead($combo)
     $_posw = WinGetPos("My GUI TAB")
     Select
        case $col= "Red"
           GUICtrlSetBkColor($lab1, 0xff0000)
           GuiSetBkColor( 0xff0000)
        case $col= "Blue"
           GUICtrlSetBkColor($lab1, 0xff)
           GuiSetBkColor( 0xff)
        case $col= "Green"
           GUICtrlSetBkColor($lab1, 0xff00)
           GuiSetBkColor( 0xff00)
        EndSelect
  EndIf
endif
Until $msg = $GUI_EVENT_CLOSE OR TimerDiff($start)>=3000
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...