Jump to content
Sign in to follow this  
JohnBailey

_GUICtrlStatusBar_SetText with Align and Color Change

Recommended Posts

JohnBailey

I like _GUICtrlStatusBar_SetText(), but is there a way to align the text and change it's color or do I need to use _GUICtrlStatusBar_EmbedControl() and embed a Label?


A decision is a powerful thing

Share this post


Link to post
Share on other sites
Zedna

Look into helpfile at _GUICtrlStatusBarCreate() - remarks

#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

Share this post


Link to post
Share on other sites
JohnBailey

Look into helpfile at _GUICtrlStatusBarCreate() - remarks

It appears I was unclear. I want to align the text without the use of @TAB, similar to how label controls use styles to align their text.

Edited by JohnBailey

A decision is a powerful thing

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  

×