Sign in to follow this  
Followers 0
ame1011

Tab Background Color

3 posts in this topic

Hi I have a tab menu that looks like the following:

post-6174-1197054602_thumb.jpg

Is there any way that I can change 'manilla color' to black? I tried setting it to transparent, setting it to black, but nothing seems to work. Even the good ole search feature hasn't helped me. Does anyone know if this is possible?


[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

Share this post


Link to post
Share on other sites



About the best I know of...

#include <GUIConstants.au3>
GUICreate("My GUI Tab",250,150); will create a dialog box that when displayed is centered

GUISetBkColor("")
GUISetFont(9, 300)

$tab=GUICtrlCreateTab (20,20, 200,100)

$tab0=GUICtrlCreateTabitem ("tab-0")
GUICtrlCreateLabel ("label0", 30,80,50,20)
$tab0OK=GUICtrlCreateButton ("OK0", 20,50,50,20)
$tab0input=GUICtrlCreateInput ("default", 80,50,70,20)

$tab1=GUICtrlCreateTabitem ( "tab-1")
GUICtrlCreateLabel ("label1", 30,80,50,20)
$tab1combo=GUICtrlCreateCombo ("", 20,50,60,120)
GUICtrlSetData(-1,"Trids|CyberSlug|Larry|Jon|Tylo", "Jon"); default Jon
$tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20)

$tab2=GUICtrlCreateTabitem ("tab-2")
GUICtrlSetState(-1,$GUI_SHOW); will be display first
GUICtrlCreateLabel ("label2", 30,80,50,20)
$tab2OK=GUICtrlCreateButton ("OK2", 140,50,50)

GUICtrlCreateTabitem (""); end tabitem definition

GUICtrlCreateLabel ("", 150, 20,210,20)
GUICtrlSetBkColor( -1, "")

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    If GUIGetMsg() = -3 Then Exit

WEnd

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

About the best I know of...

#include <GUIConstants.au3>
GUICreate("My GUI Tab",250,150); will create a dialog box that when displayed is centered

GUISetBkColor("")
GUISetFont(9, 300)

$tab=GUICtrlCreateTab (20,20, 200,100)

$tab0=GUICtrlCreateTabitem ("tab-0")
GUICtrlCreateLabel ("label0", 30,80,50,20)
$tab0OK=GUICtrlCreateButton ("OK0", 20,50,50,20)
$tab0input=GUICtrlCreateInput ("default", 80,50,70,20)

$tab1=GUICtrlCreateTabitem ( "tab-1")
GUICtrlCreateLabel ("label1", 30,80,50,20)
$tab1combo=GUICtrlCreateCombo ("", 20,50,60,120)
GUICtrlSetData(-1,"Trids|CyberSlug|Larry|Jon|Tylo", "Jon"); default Jon
$tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20)

$tab2=GUICtrlCreateTabitem ("tab-2")
GUICtrlSetState(-1,$GUI_SHOW); will be display first
GUICtrlCreateLabel ("label2", 30,80,50,20)
$tab2OK=GUICtrlCreateButton ("OK2", 140,50,50)

GUICtrlCreateTabitem (""); end tabitem definition

GUICtrlCreateLabel ("", 150, 20,210,20)
GUICtrlSetBkColor( -1, "")

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    If GUIGetMsg() = -3 Then Exit

WEnd

8)

Ah, thanks Valuater, I've been trying different ways to do this and this is much simpler than what I was trying.

Here's another way to do it, but it doesn't work (or I can't make it work simply) when you need to be able to resize the control.

#include <GUIConstants.au3>
GUICreate("My GUI Tab",250,150); will create a dialog box that when displayed is centered

GUISetBkColor("")
GUISetFont(9, 300)

$tab=GUICtrlCreateTab (20,20, 200,100,$TCS_FIXEDWIDTH);must have this style for setting the tab width

$tab0=GUICtrlCreateTabitem ("tab-0")
GUICtrlCreateLabel ("label0", 30,80,50,20)
$tab0OK=GUICtrlCreateButton ("OK0", 20,50,50,20)
$tab0input=GUICtrlCreateInput ("default", 80,50,70,20)

$tab1=GUICtrlCreateTabitem ( "tab-1")
GUICtrlCreateLabel ("label1", 30,80,50,20)
$tab1combo=GUICtrlCreateCombo ("", 20,50,60,120)
GUICtrlSetData(-1,"Trids|CyberSlug|Larry|Jon|Tylo", "Jon"); default Jon
$tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20)

$tab2=GUICtrlCreateTabitem ("tab-2")
GUICtrlSetState(-1,$GUI_SHOW); will be display first
GUICtrlCreateLabel ("label2", 30,80,50,20)
$tab2OK=GUICtrlCreateButton ("OK2", 140,50,50)

GUICtrlCreateTabitem (""); end tabitem definition
GuictrlSendMsg($Tab, $TCM_SETITEMSIZE, 0, _MakeLong(65, 21)); increase the width of the tabs

;GUICtrlCreateLabel ("", 150, 20,210,20)
;GUICtrlSetBkColor( -1, "")

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    If GUIGetMsg() = -3 Then Exit

WEnd


Func _MakeLong($l, $h)
    Return BitOR(BitAnd($l, 0xFFFF), BitShift(BitAnd($h, 0xFFFF), -16))
EndFunc; _MakeLong()
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

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