Jump to content

Status bar left AND right justify


CiVQ
 Share

Recommended Posts

Hello.

Is there a solution (except the obvious, resize the items method), to create a status bar for a GUI, and to justify some items to the left, while other items to the right in given status bar?
(not the text in the items, but the items themselves, in the status bar)

Thanks.

BR, CiV

 

I know that my code is ugly. But it works. Mostly.

Link to comment
Share on other sites

Yes, here is a hint  
More explanations and comments in the helpfile  :)

#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>

$hGUI = GUICreate("StatusBar Set Parts", 400, 300)
$hStatus = _GUICtrlStatusBar_Create($hGUI)
GUISetState(@SW_SHOW)

$pos = WinGetPos($hGUI)
Local $aParts[3] = [75, $pos[2]-75, -1]

_GUICtrlStatusBar_SetParts($hStatus, $aParts)
_GUICtrlStatusBar_SetText ($hStatus, "left justified", 0)
_GUICtrlStatusBar_SetText ($hStatus, "right justified", 2)

Do
   Sleep(10)
Until GUIGetMsg() = $GUI_EVENT_CLOSE

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...