Sl4yer Posted May 19, 2009 Posted May 19, 2009 hello, im trying to set the BgColor for my StatusBar but it WONT work... i just dont get it -.- My code: Local $aText[3] = ["", @TAB & "", @TAB & @TAB & ""] $statusLabel = _GUICtrlStatusBar_Create($mainwindow, -1, $aText) Func statusLabelFunc() Local $aParts[3] = [75, 170, -1] _GUICtrlStatusBar_SetParts($statusLabel, $aparts) _GUICtrlStatusBar_SetBkColor($statusLabel, 0xFFFFFF); $CLR_MONEYGREEN doesnt work either what param is the right one ?? _GUICtrlStatusBar_SetText($statusLabel, "searching", 2) Sleep(200) _GUICtrlStatusBar_SetText($statusLabel, "searching.", 2) Sleep(200) _GUICtrlStatusBar_SetText($statusLabel, "searching..", 2) Sleep(200) _GUICtrlStatusBar_SetText($statusLabel, "searching...", 2) Sleep(200) EndFunc i also read the manual but still dont get it: _GUICtrlStatusBar_SetBkColor -------------------------------------------------------------------------------- Sets the background color #Include <GuiStatusBar.au3> _GUICtrlStatusBar_SetBkColor($hWnd, $iColor) Parameters - $hWnd Handle to the control - $iColor New background color. Specify the CLR_DEFAULT value to cause the status bar to use its default background color. Return Value - Success: The previous background color, or CLR_DEFAULT if the background color is the default color Remarks - Returns RGB COLORREF color, color passed in must be BGR Hex color or RGB COLORREF
GEOSoft Posted May 19, 2009 Posted May 19, 2009 It seems to me that I had this problem the one and only time I tried it. Even the example doesn't work and nothing was ever done about it. George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Valuater Posted May 19, 2009 Posted May 19, 2009 Your code has too many errors to correct it... This works for Xp.. expandcollapse popup#include <GuiConstantsEx.au3> #include <GuiStatusBar.au3> #include <WinAPI.au3> #include <Constants.au3> Dim $XS_n $Debug_SB = False ; Check ClassName being passed to functions, set to True and use a handle to another control to see it work _Main() Func _Main() Local $hGUI, $hStatus Local $aParts[3] = [75, 150, -1] ; Create GUI XPStyle(1) $hGUI = GUICreate("(Example 1) StatusBar Set BkColor", 400, 300) $hStatus = _GUICtrlStatusBar_Create ($hGUI) GUISetState() ; Set parts _GUICtrlStatusBar_SetParts ($hStatus, $aParts) _GUICtrlStatusBar_SetText ($hStatus, "Part 1") _GUICtrlStatusBar_SetText ($hStatus, "Part 2", 1) ; Set background color _GUICtrlStatusBar_SetBkColor ($hStatus, $CLR_MONEYGREEN) ; Loop until user exits XPStyle(0) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main Func XPStyle($OnOff = 1) If $OnOff And StringInStr(@OSTYPE, "WIN32_NT") Then $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties") DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) Return 1 ElseIf StringInStr(@OSTYPE, "WIN32_NT") And IsArray($XS_n) Then DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0]) $XS_n = "" Return 1 EndIf Return 0 EndFunc ;==>XPStyle 8)
Sl4yer Posted May 19, 2009 Author Posted May 19, 2009 @Valuater thnx man hm.. if i'd known that the solution is this awful i'd neva had asked 4 it ps: im on vista x64
GEOSoft Posted May 19, 2009 Posted May 19, 2009 Never even thought about it being XP style related. Maybe it would help if that were added to the example(s) in the help file. George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Valuater Posted May 19, 2009 Posted May 19, 2009 GEOSoft said: Never even thought about it being XP style related. Maybe it would help if that were added to the example(s) in the help file.It's in your favorite.... Autoit Wrappers.... 8)
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