BlackHoleSun Posted December 8, 2010 Share Posted December 8, 2010 How do you make the status bar stay on the bottom and 100% width when you resize your window? Also, I have the resize option in the bottom right of just the status bar, but the option isn't set, and it's cutting off the end of my copyright text. If I enter spaces it's fine. So how do I fix that? My code is below: Local $statusTxt[2] = ["Status", @TAB & @TAB & "© First Name Last Name"] $guiStatusBar = _GUICtrlStatusBar_Create($gui, 100, $statusTxt) Link to comment Share on other sites More sharing options...
KaFu Posted December 8, 2010 Share Posted December 8, 2010 Two lines are not enough ... make an executable example and the chances for an useful answer will rise dramatically ... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
BlackHoleSun Posted December 8, 2010 Author Share Posted December 8, 2010 Two lines are not enough ... make an executable example and the chances for an useful answer will rise dramatically ... expandcollapse popup$version = 0.1 Global $gui #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <TreeViewConstants.au3> #include <GuiStatusBar.au3> #include <AD.au3> Opt('MustDeclareVars', 1) ;_AD_Open() _Main() Func _Main() ;GUI $gui = GUICreate("Query v" & $version, 700, 370, (@DesktopWidth - 700) / 2, (@DesktopHeight - 370) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) ;File Menu Local $menuFile, $menuItemExit $menuFile = GUICtrlCreateMenu("&File") $menuItemExit = GUICtrlCreateMenuItem("E&xit", $menuFile) ;Query Input Local $queryLbl, $queryIn, $querySub $queryLbl = GUICtrlCreateLabel("Query:", 5, 5) $queryIn = GUICtrlCreateInput("", 40, 2, 150, 20) $querySub = GUICtrlCreateButton("Su&bmit", 191, 1, 50, 22) ;Status Bar Local $guiStatusBar Local $statusTxt[2] = ["Status", @TAB & @TAB & "© Me 2010 "] $guiStatusBar = _GUICtrlStatusBar_Create($gui, 100, $statusTxt) GUISetState() While 1 Local $msg $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $menuItemExit _Exit() Case $msg = $querySub _Query(GUICtrlRead($queryIn)) EndSelect WEnd GUIDelete() _Exit() EndFunc ;==>_Main Func _Query($query) EndFunc ;==>_Query Func _Exit() ;_AD_Close() Exit EndFunc ;==> _Exit Link to comment Share on other sites More sharing options...
KaFu Posted December 8, 2010 Share Posted December 8, 2010 This fixes the resizing... about the text being cut, it's just the length of the string (two tabs). A solution might be to have the right path right oriented, but I don't know if that is possible ... expandcollapse popup$version = 0.1 Global $gui, $guiStatusBar #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <TreeViewConstants.au3> #include <GuiStatusBar.au3> Opt('MustDeclareVars', 1) ;_AD_Open() _Main() Func _Main() ;GUI $gui = GUICreate("Query v" & $version, 700, 370, (@DesktopWidth - 700) / 2, (@DesktopHeight - 370) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) ;File Menu Local $menuFile, $menuItemExit $menuFile = GUICtrlCreateMenu("&File") $menuItemExit = GUICtrlCreateMenuItem("E&xit", $menuFile) ;Query Input Local $queryLbl, $queryIn, $querySub $queryLbl = GUICtrlCreateLabel("Query:", 5, 5) $queryIn = GUICtrlCreateInput("", 40, 2, 150, 20) $querySub = GUICtrlCreateButton("Su&bmit", 191, 1, 50, 22) ;Status Bar Local $statusTxt[2] = ["Status", @TAB & "© Me 2010 "] $guiStatusBar = _GUICtrlStatusBar_Create($gui, 100, $statusTxt,$SBARS_SIZEGRIP) GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE") GUISetState() While 1 Local $msg $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $menuItemExit _Exit() Case $msg = $querySub _Query(GUICtrlRead($queryIn)) EndSelect WEnd GUIDelete() _Exit() EndFunc ;==>_Main Func _Query($query) EndFunc ;==>_Query Func _Exit() ;_AD_Close() Exit EndFunc ;==>_Exit Func MY_WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam) _GUICtrlStatusBar_Resize($guiStatusBar) Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_SIZE OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
BlackHoleSun Posted December 8, 2010 Author Share Posted December 8, 2010 Thanks KaFu! It works like a charm now. I did notice I can resize the window with either the status bar or the window border itself. I guess I'll have to look into resizing the gui some more. Thanks again! 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