Jump to content
Sign in to follow this  

Status bar left AND right justify

Recommended Posts


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)




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

Share this post

Link to post
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)

$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)



Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...