Jump to content

possible to add background color to a tab?


Recommended Posts

well??? is it possible to add background color to tabs?

when i put this in my script...

$background = GUICtrlCreatePic(@DesktopDir & "\key\config\test.jpg", 0, 0, 560, 490)

the tabs dont show at all. this was all i could think of. also, i tried setting the gui color, but it did not effect the tabs.

ALSO... i use this for a few pictures on my gui.

GUICtrlCreateAvi(@DesktopDir & "\key\config\fire.avi", 0, 0, 440, 32, 32, $ACS_AUTOPLAY)

but it shows on all of the tabs.

is there a way to put a picture on only one tab, and not have it be on them all?

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

I have two great ideas .....but

First.... did this work for you?

#84051

Second.... did this work for you?

http://www.autoitscript.com/forum/index.php?showtopic=12178#

you should let people know if things helped you

8)

<{POST_SNAPBACK}>

first link, actually, i was more or less wondering if there was any way to detect what tab a user is on.

for second link,

i updated since, i want to know if there is a way to "force" hiding the window, and not use the macro.

ty for your ideas so far. i am eagerly waiting to hear youyr other ideas! :(

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

First i use this******

$Favorites_jpg = @HomeDrive & "\Temp\Favorites-bk.jpg"

FileInstall("C:\XPClean-web\Settings\XPClean-pics\Favorites-Backgnd-jpg.jpg", $Favorites_jpg)

then this*********

$tab1 = GUICtrlCreateTabItem(" My Favorites ")

GUICtrlCreatePic($Favorites_jpg, 10, 31, 491, 321, $SS_SUNKEN)

GUICtrlSetState(-1, $GUI_DEFBUTTON) ; will display this tab first

........ bla...bla...bla

and this is my result************

This pic only shows on this tab and i have the same setup with a different pic in every tab

i think this will fix your problem with tabs and pictures

also ******************* for color

1. when i accidently did not install the pic correctly "wrong name".. but did the above

it changed the color to tan

2. recently i did this for color

GuiCreate("*XPClean Menu* )

GUISetBkColor ("")

did all my set up

and put it in again here*******

GuiSetState()

GUISetBkColor ("")

While 1

* the background was black

thanks for responding...and

HOPE THIS HELPS TOO! 8)

NEWHeader1.png

Link to comment
Share on other sites

#include <GUIConstants.au3>
$Favorites_jpg = @DesktopDir & "\key\config\test2.jpg"
FileInstall("C:\Documents and Settings\Administrator\Desktop\key\config\test.jpg", $Favorites_jpg)


$GUI = GUICreate("testing", 510, 390)
guisetstate()

GUICtrlCreateTab(0, 22, 510, 390)

$tab1 = GUICtrlCreateTabItem(" My Favorites ")
GUICtrlCreatePic($Favorites_jpg, 0, 22, 200, 200, $SS_SUNKEN)
GUICtrlSetState(-1, $GUI_DEFBUTTON); will display this tab first

while 1
    WEnd

i did this to test it out, and i dont get any picture displaying at all.

also, i was wondering if there is a way to "detect" what tab the user is on.

global $tabdetect ; or something.......

like, they click tab 3 out of 5 tabs.. for example,

the variable $tabdetect would have a value of 3

and they click tab 1 out of 5 tabs..

the variable $tabdetect would have a value of 1

anything like that?

and i cant get the picture to display, whats wrong with the code?

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

EDITED

First

guisetstate()

this goes just before

"While 1"

Second

in previous versions of autoit there was'nt much for tab controls

but in ver 3.1.1+++

there is an "include" called

#include <GuiTab.au3>.... i'm not sure wjhat all it can do...but

i found this under 3.1.1+++ help

Sets the interval frequency for tick marks in a slider.

_GUICtrlTabDeleteAllItems Removes all items from a tab control.

_GUICtrlTabDeleteItem Removes an item from a tab control.

_GUICtrlTabDeselectAll Resets items in a tab control.

_GUICtrlTabGetCurFocus Returns the index of the item that has the focus in a tab control.

_GUICtrlTabGetCurSel Determines the currently selected tab in a tab control.

_GUICtrlTabGetExtendedStyle Retrieves the extended styles that are currently in use for the tab control.

_GUICtrlTabGetItemCount Retrieves the number of tabs in the tab control.

_GUICtrlTabGetItemRECT Retrieves the bounding rectangle for a tab in a tab control.

_GUICtrlTabGetRowCount Retrieves the current number of rows of tabs in a tab control.

_GUICtrlTabGetUnicodeFormat Retrieves the Unicode character format flag for the control.

_GUICtrlTabHighlightItem Sets the highlight state of a tab item.

_GUICtrlTabSetCurFocus Sets the focus to a specified tab in a tab control.

_GUICtrlTabSetCurSel Selects a tab in a tab control.

_GUICtrlTabSetMinTabWidth Sets the minimum width of items in a tab control.

_GUICtrlTabSetUnicodeFormat Sets the Unicode character format flag for the control.

good luck

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

oops!

my lil mistake cant beleive i did it...

winsetstate() yeah... i put it in the wrong place didnt i!! lol

thanks, works beautifully

*tear rolls down cheek

as for the beta...

_GUICtrlTabGetCurSel Determines the currently selected tab in a tab control.

looks like exactly what i need!

very helpful, very fast response!

kudos to you val!

-t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

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