Jump to content
CiVQ

Status bar left AND right justify

Recommended Posts

CiVQ

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.

Share this post


Link to post
Share on other sites
mikell

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

 

Share this post


Link to post
Share on other sites
CiVQ

Thank you, that's what I need!

BR, CiV.


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

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

×