Jump to content

How to create a sunken label aligned right


SoulBlade
 Share

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!

Link to comment
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

Link to comment
Share on other sites

  • 1 year later...

#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
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...