sandin Posted May 10, 2008 Posted May 10, 2008 how can I change color right from "tab1": #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 372, 225, 214, 154) GUISetBkColor (0x292929) $Tab1 = GUICtrlCreateTab(32, 20, 305, 185) $tabItem1 = GUICtrlCreateTabItem("tab1") $tabItem2 = GUICtrlCreateTabItem("tab2") GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I want it to be black like the window background, so... how can I do it? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
martin Posted May 10, 2008 Posted May 10, 2008 (edited) how can I change color right from "tab1": #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 372, 225, 214, 154) GUISetBkColor (0x292929) $Tab1 = GUICtrlCreateTab(32, 20, 305, 185) $tabItem1 = GUICtrlCreateTabItem("tab1") $tabItem2 = GUICtrlCreateTabItem("tab2") GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I want it to be black like the window background, so... how can I do it? Easiest way I know is #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 372, 225, 214, 154) GUISetBkColor (0x292929) $Tab1 = GUICtrlCreateTab(32, 20, 305, 185) $tabItem1 = GUICtrlCreateTabItem("tab1") $tabItem2 = GUICtrlCreateTabItem("tab2") GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlCreateTabItem("") GUICtrlCreateLabel("",120,20,260,19) GUICtrlSetBkColor(-1,0x292929) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Another way is #include <GUIConstants.au3> #include <tabconstants.au3> $Form1 = GUICreate("Form1", 372, 225, 214, 154) GUISetBkColor (0x292929) $TabWid = 305-32 $Tab1 = GUICtrlCreateTab(32, 20, 305, 185,$TCS_FIXEDWIDTH) $tabItem1 = GUICtrlCreateTabItem("tab1") $tabItem2 = GUICtrlCreateTabItem("tab2") GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) $method = 2 If $method = 1 Then GUICtrlCreateLabel("",120,20,$tabWid - 13,19) GUICtrlSetBkColor(-1,0x292929) Else ConsoleWrite("2" & @CRLF) GuictrlSendMsg($Tab1, $TCM_SETITEMSIZE, 0, _MakeLong(151, 20)) EndIf while 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _MakeLong($l, $h) Return BitOR(BitAnd($l, 0xFFFF), BitShift(BitAnd($h, 0xFFFF), -16)) EndFunc; _MakeLong() Edited August 22, 2009 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.
sandin Posted May 10, 2008 Author Posted May 10, 2008 I like your first code, thank you it'll do Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now