Jump to content
Sign in to follow this  

Change window background color in Tab control

Recommended Posts

Here is what I ended up with. 

* Edit: Adding three lines to my main script, is much easier than the above example at the top of this thread. That way might be more "correct", and this way a little more "hacky" but hey! It works! 

Well - 2 lines actually :) no need to establish a default label and then resize it in this example hehe.

#include <GuiConstantsEx.au3>
#include <GuiTab.au3>
#include <StaticConstants.au3>

; Create GUI
Global $hGUI = GUICreate ("Test", 500, 500)

; Create label to cover tab "tab"
Global $hColourTab = GUICtrlCreateLabel("", 0, 0, 1, 1, BitOR($SS_NOTIFY, $SS_CENTER))
; Place label
; Set colour
GUICtrlsetBkColor ($hColourTab,0x888888 )

; Create tab
Global $hTab = GUICtrlCreateTab(10, 10, 400, 300)

; Create tab items and colour them
For $i = 0 To 3
    GUICtrlCreateTabItem ("Tab item - " & $i)
    GUICtrlCreateButton("Button " & $i, 50 + (80 * $i), 50, 80, 30)
    GUICtrlCreateListView("Col " & $i, 50, 100, 200, 100)
    GUICtrlCreateTabItem ("")

GUISetState ()

While 1
    Switch GUIGetMsg ()
        Case $GUI_EVENT_CLOSE
Edited by JakeJohnson74

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...