Jump to content
Sign in to follow this  
SoulBlade

How to create a sunken label aligned right

Recommended Posts

Hi!

I'm trying to create a sunken label right aligned.

When i use:

GUICtrlCreateLabel("TEXT" ,255, 15, 50, 15,$SS_SUNKEN )

the label is always aligned left.

If i use:

GUICtrlCreateLabel("TEXT" ,255, 15, 50, 15,$SS_SUNKEN, $SS_RIGHT )

this disables the sunken effect.

Any ideias?

Thanks!

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

$Form1 = GUICreate("Form1", 633, 454, 193, 115)
$Label1 = GUICtrlCreateLabel("Sunken Right", 112, 80, 415, 41, BitOR($SS_RIGHT,$SS_SUNKEN))
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd



Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

$Form1 = GUICreate("Form1", 633, 454, 193, 115)
$Label1 = GUICtrlCreateLabel("Sunken Right", 112, 80, 415, 41, BitOR($SS_RIGHT,$SS_SUNKEN))
GUICtrlSetFont(-1, 24, 800, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

I used these codes on new version of autoit, but it gives an error.

Messages:

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Documents and Settings\Administrator\Desktop\Sunken.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams

+>21:14:49 Starting AutoIt3Wrapper v.1.10.1.14 Environment(Language:0409 Keyboard:00000409 OS:WIN_XP/Service Pack 2 CPU:X86 ANSI)

>Running AU3Check (1.54.14.0) from:C:\Program Files\AutoIt3

C:\Documents and Settings\Administrator\Desktop\Sunken.au3(4,79) : WARNING: $SS_RIGHT: possibly used before declaration.

$Label1 = GUICtrlCreateLabel("Sunken Right", 112, 80, 415, 41, BitOR($SS_RIGHT,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Administrator\Desktop\Sunken.au3(4,90) : WARNING: $SS_SUNKEN: possibly used before declaration.

$Label1 = GUICtrlCreateLabel("Sunken Right", 112, 80, 415, 41, BitOR($SS_RIGHT,$SS_SUNKEN)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Administrator\Desktop\Sunken.au3(4,79) : ERROR: $SS_RIGHT: undeclared global variable.

$Label1 = GUICtrlCreateLabel("Sunken Right", 112, 80, 415, 41, BitOR($SS_RIGHT,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\Administrator\Desktop\Sunken.au3 - 1 error(s), 2 warning(s)

!>21:14:49 AU3Check ended.rc:2

Please help.

Thanks

Edited by euverve

Share this post


Link to post
Share on other sites

I used these codes on new version of autoit, but it gives an error.

Messages:

Please help.

Thanks

$SS_SUNKEN, $SS_RIGHT are declared in the StaticConstants.au3 file in the \include\ directory. So add

#include <StaticConstants.au3>

to top of script.

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  

×
×
  • Create New...