FeReNGi Posted August 3, 2006 Share Posted August 3, 2006 Is it in someway possible to create a StatusBar with _GuiCtrlStatusBarCreate and hide it in you program and show it again in some other part of your program ? If yes how can we do that ? ServicesPE|LoadVMDK Link to comment Share on other sites More sharing options...
GaryFrost Posted August 4, 2006 Share Posted August 4, 2006 Is it in someway possible to create a StatusBar with _GuiCtrlStatusBarCreate and hide it in you program and show it again in some other part of your program ?If yes how can we do that ?Not sure what exactly you mean, but why not just create a status bar on the other part of your program? SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
rush4hire Posted August 4, 2006 Share Posted August 4, 2006 He probably wants to show the same status bar. I forgot what a status bar is... Decompilable game code manager for Dark Deeds 6 for Warcraft IIIA web broadcast TiVo like thing.. (this example is for 3abn.org)Finally.. AutoIt Pac-Man Digital Hymn Player Link to comment Share on other sites More sharing options...
FeReNGi Posted August 4, 2006 Author Share Posted August 4, 2006 Now i use a smal window as a statusbar and with GUICtrlSetState($guiStatus1,$GUI_HIDE) i hide them Is this also possible for the _GuiCtrlStatusBar ? ServicesPE|LoadVMDK Link to comment Share on other sites More sharing options...
GaryFrost Posted August 6, 2006 Share Posted August 6, 2006 Now i use a smal window as a statusbar and with GUICtrlSetState($guiStatus1,$GUI_HIDE) i hide themIs this also possible for the _GuiCtrlStatusBar ?Far as I know, no. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 6, 2006 Moderators Share Posted August 6, 2006 Might be able to just use ControlHide() Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GaryFrost Posted August 6, 2006 Share Posted August 6, 2006 Might be able to just use ControlHide() Good luck, I believe the status bar hooks into the gui, try hiding it using controlhide and see what happens. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 6, 2006 Moderators Share Posted August 6, 2006 Good luck, I believe the status bar hooks into the gui, try hiding it using controlhide and see what happens.Thus the "might"... Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
GaryFrost Posted August 6, 2006 Share Posted August 6, 2006 Thus the "might"... It can be destroyed (deleted) and a new one created i.e. opt("MustDeclareVars", 1) Opt('WinTitleMatchMode', 4) #include <GUIConstants.au3> #Include <GuiStatusBar.au3> Local $gui, $StatusBar1, $msg Local $a_PartsRightEdge[3] = [100, 350, -1] Local $a_PartsText[3] = ["New Text", "More Text", "Even More Text"] $gui = GUICreate("Status Bar Create", 500, -1, -1, -1, $WS_SIZEBOX) ConsoleWrite(HWnd($gui) & @LF) $StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, $a_PartsText) GUISetState(@SW_SHOW) Sleep ( 3000 ) DllCall("user32.dll","int","DestroyWindow","hwnd",HWnd($StatusBar1)) While 1 $msg = GUIGetMsg() Select ;~ Case $msg = $GUI_EVENT_RESIZED ;~ _GUICtrlStatusBarResize ($StatusBar1) Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;; EndSelect WEnd SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
GaryFrost Posted August 6, 2006 Share Posted August 6, 2006 can also hide it and show it might add a few more functions to the udf Sleep ( 3000 ) DllCall("user32.dll","int","ShowWindow","hwnd",HWnd($StatusBar1),"int",@SW_HIDE) Sleep ( 3000 ) DllCall("user32.dll","int","ShowWindow","hwnd",HWnd($StatusBar1),"int",@SW_SHOW) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 6, 2006 Moderators Share Posted August 6, 2006 can also hide it and show it might add a few more functions to the udf Sleep ( 3000 ) DllCall("user32.dll","int","ShowWindow","hwnd",HWnd($StatusBar1),"int",@SW_HIDE) Sleep ( 3000 ) DllCall("user32.dll","int","ShowWindow","hwnd",HWnd($StatusBar1),"int",@SW_SHOW)I like that one ... well I like the destroy window too, but for the cause of this thread... Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
powaking Posted September 1, 2006 Share Posted September 1, 2006 I like that one ... well I like the destroy window too, but for the cause of this thread...how does one get the text in the statusbar to be centered? I've tried using the $SS_CENTER and doesn't seem to work. Link to comment Share on other sites More sharing options...
GaryFrost Posted September 1, 2006 Share Posted September 1, 2006 how does one get the text in the statusbar to be centered? I've tried using the $SS_CENTER and doesn't seem to work.You would have to create an owner-drawn statusbar, this one is not owner-drawn. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
powaking Posted September 1, 2006 Share Posted September 1, 2006 (edited) You would have to create an owner-drawn statusbar, this one is not owner-drawn. Hmm ok, I'll see what I can do otherwise. On another note, how about a progress bar in the status bar? I tried to do something like this where the partsrightedge would increase and then the background of the bar color would redraw but can't get the color to take. #include <GuiStatusBar.au3> #include <guiconstants.au3> Dim $a_PartsRightEdge = 0 Dim $a_PartsText = "" $count = 1 $sbp = GUICreate("Status Progress Bar",200,200,-1,-1) ;GUICtrlSetResizing(-1,$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $StatusBar1 = _GuiCtrlStatusBarCreate($sbp, $a_PartsRightEdge, $a_PartsText, $SBT_TOOLTIPS) _GuiCtrlStatusBarSetMinHeight($StatusBar1, 10) _GUICtrlStatusBarSetBKColor($statusbar1,0x0ff0000) GUICtrlSetBkColor($statusbar1,0x0ff0000) GUISetState() For $x = 1 To 200 Step 1 $StatusBar1 = _GuiCtrlStatusBarCreate($sbp, $x, $a_PartsText, $SBT_TOOLTIPS) _GUICtrlStatusBarResize($StatusBar1) _GUICtrlStatusBarSetBKColor($statusbar1,0x001421) Sleep(200) Next $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Edited September 1, 2006 by powaking Link to comment Share on other sites More sharing options...
GaryFrost Posted September 1, 2006 Share Posted September 1, 2006 (edited) don't have time to look at it, it's Friday and time for me to go, but here's a link for you too look athttp://www.autoitscript.com/forum/index.ph...st&p=140771BTW the Search feature of the forum works for everyone. Edited September 1, 2006 by gafrost SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
powaking Posted September 1, 2006 Share Posted September 1, 2006 don't have time to look at it, it's Friday and time for me to go, but here's a link for you too look athttp://www.autoitscript.com/forum/index.ph...st&p=140771BTW the Search feature of the forum works for everyone.Thanks. I remember seeing that post too. Link to comment Share on other sites More sharing options...
FeReNGi Posted September 8, 2006 Author Share Posted September 8, 2006 @gafrost Thnx for making it possible to hide the statusbar when needed Another question : is it possibel to put text on 2 lines instead of 1 line ? ServicesPE|LoadVMDK Link to comment Share on other sites More sharing options...
GaryFrost Posted September 8, 2006 Share Posted September 8, 2006 @gafrost Thnx for making it possible to hide the statusbar when neededAnother question : is it possibel to put text on 2 lines instead of 1 line ?Far as I can tell nope. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Zedna Posted September 14, 2006 Share Posted September 14, 2006 @gafrost Thnx for making it possible to hide the statusbar when neededAnother question : is it possibel to put text on 2 lines instead of 1 line ?What about create 2 statusbars?Try it, maybe it will work... Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Zedna Posted September 15, 2006 Share Posted September 15, 2006 You would have to create an owner-drawn statusbar, this one is not owner-drawn. Owner draw is not needed. It's very simple: By default, text is left-aligned within the specified part of a status bar. You can embed tab characters (\ t) in the text to center or right-align it. Text to the right of a single tab character is centered, and text to the right of a second tab character is right-aligned. #include <GUIConstants.au3> #Include <GuiStatusBar.au3> Local $a_PartsRightEdge[3] = [100, 350, -1] Local $a_PartsText[3] = [@TAB & @TAB & "New Text", "Left" & @TAB & "Center" & @TAB & "Right", "Even More Text"] $gui = GUICreate("Status Bar Create", 500, -1, -1, -1, $WS_SIZEBOX) $StatusBar1 = _GUICtrlStatusBarCreate ($gui, $a_PartsRightEdge, $a_PartsText) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_RESIZED _GUICtrlStatusBarResize ($StatusBar1) Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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