Naveed Posted June 7, 2010 Posted June 7, 2010 Anybody Had this problem, i am able to get it working on a new Gui like the one below but when i add it to an existing GUI, the Status Bar shows as a thin line at the bottom, anyone have any ideas? Here is my working demo expandcollapse popup#include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <Timers.au3> #include <GuiStatusBar.au3> #include <ProgressConstants.au3> Global $progress, $input, $but1 Opt("GUIOnEventMode", 1) $hgui = GUICreate("Status Bar Test",500,100,-1,-1) GUICtrlSetOnEvent($GUI_EVENT_CLOSE,"close") ;Create Status Bar Local $aParts[3] = [65, 420,-1] $hstatus = _GUICtrlStatusBar_Create($hgui,-1,"",$sbars_sizegrip) _GUICtrlStatusBar_SetParts($hstatus, $aParts) ;Test Button $but1 = GUICtrlCreateButton("Test",10,5,40,30) GUICtrlSetOnEvent($but1,"update") Func update() $progress = GUICtrlCreateProgress(0, 0, -1, -1, $PBS_SMOOTH) $hProgress = GUICtrlGetHandle($progress) _GUICtrlStatusBar_EmbedControl ($hStatus, 1, $hProgress) GUICtrlSetData($progress,25) GUICtrlSetData($input,"Loading") Sleep(2000) GUICtrlSetData($progress,50) GUICtrlSetData($input,"Loading") Sleep(2000) GUICtrlSetData($progress,75) GUICtrlSetData($input,"Loading") Sleep(2000) GUICtrlSetData($progress,100) Sleep(2000) GUICtrlSetData($input,"Ready") GUICtrlDelete($progress) EndFunc ;Embed Text $input = GUICtrlCreateLabel("Ready ", 0, 0) GUICtrlSetFont($input,12,2,"","Cambria") $hInput = GUICtrlGetHandle($input) _GUICtrlStatusBar_EmbedControl ($hStatus, 0, $hInput, 2) ;Embed Time _GUICtrlStatusBar_SetText($hStatus, @TAB & StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC), 2) _Timer_SetTimer($hGUI, 1000, "_UpdateStatusBarClock") ; create timer Func _UpdateStatusBarClock($hWnd, $Msg, $iIDTimer, $dwTime) #forceref $hWnd, $Msg, $iIDTimer, $dwTime _GUICtrlStatusBar_SetText($hStatus, @TAB & StringFormat("%02d:%02d:%02d", @HOUR, @MIN, @SEC), 2) EndFunc Func close() Exit EndFunc GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Thanks in advance Nav
UEZ Posted June 7, 2010 Posted June 7, 2010 I think your are making something wrong then! Show us the your existing GUI! BR, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
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