sylvanie Posted March 18, 2007 Posted March 18, 2007 Hello ! I have looking for a way to color the text of a statusbar, like _GUICtrlStatusBarSetBKColor for the Background, but i haven't found. Is it possible actualy to do it ? Thanks
tirom Posted June 21, 2008 Posted June 21, 2008 Hello !I have looking for a way to color the text of a statusbar, like _GUICtrlStatusBarSetBKColor for the Background, but i haven't found.Is it possible actualy to do it ?ThanksI want to know too ... Expo 2010 Shanghai China中国2010年上海世博会
Valuater Posted June 21, 2008 Posted June 21, 2008 wow... straight from help this does not work... but, even more it does not error for $CLR_MONEYGREEN (non declared)!!!...??? #include <GuiConstantsEx.au3> #include <GuiStatusBar.au3> #include <WinAPI.au3> #include <Constants.au3> Opt('MustDeclareVars', 1) $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 $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 Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main 8)
GaryFrost Posted June 22, 2008 Posted June 22, 2008 wow... straight from help this does not work... but, even more it does not error for $CLR_MONEYGREEN (non declared)!!!...??? #include <GuiConstantsEx.au3> #include <GuiStatusBar.au3> #include <WinAPI.au3> #include <Constants.au3> Opt('MustDeclareVars', 1) $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 $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 Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main 8) Works for me. $CLR_MONEYGREEN is defined in Constants.au3 SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Valuater Posted June 22, 2008 Posted June 22, 2008 Works for me. $CLR_MONEYGREEN is defined in Constants.au3 Maybe its Xp This works... expandcollapse popup#include <GuiConstantsEx.au3> #include <GuiStatusBar.au3> #include <WinAPI.au3> #include <Constants.au3> Opt('MustDeclareVars', 1) 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 $hGUI = GUICreate("(Example 1) StatusBar Set BkColor", 400, 300) XPStyle() $hStatus = _GUICtrlStatusBar_Create ($hGUI) XPStyle(0) 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 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)
tirom Posted June 22, 2008 Posted June 22, 2008 THX for Gary & Valuater! but we want is not _GUICtrlStatusBarSetBKColor, just like _GUICtrlStatusBarSetTxtColor ,to change the TXT Color. Expo 2010 Shanghai China中国2010年上海世博会
GaryFrost Posted June 22, 2008 Posted June 22, 2008 http://msdn.microsoft.com/en-us/library/cc656598(VS.85).aspx SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
GaryFrost Posted June 22, 2008 Posted June 22, 2008 http://www.ureader.com/msg/14841564.aspx SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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