It is currently 01 Jan 2010, 07:49

Welcome
Welcome to the SDB Engine Forum!
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!


Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Labels
PostPosted: 02 Nov 2008, 23:48 

Joined: 27 May 2008, 19:38
Posts: 67
Location: Dresden / Germany
Hi Fabio,

I would like to have a feature that would make it possible to align text with the label box right, center or left.

Thanks for considering! :-)

Micha

_________________
CD32 + SX1; AmiKit (WinUAE) + OS3.9


Top
 Profile  
 
 Post subject: Re: Labels
PostPosted: 03 Nov 2008, 09:27 
Site Admin
User avatar

Joined: 22 Mar 2007, 22:50
Posts: 112
Hi Micha,
this feature already exists but align all lines of the text in the same way, this means that you can't (actually) align the first line to the right and the second line to the left for example.
If you want align all the label contents just use the tag Alignment inside the field Text, see below, there is a Label declaration with the Alignment definition:
Code:
scui.NewObject( #IFOCLASS_LABEL,
                "Title_Label",
                { x =   5, y =   5 },
                { x = 790, y =  40 },
                { Bevel = { Colors = { Fill1 = { r = 255, g = 255, b = 160 } } },
                  Text  = { FontName = "Diamond.font", FontSize = 12 , Alignment = #TEXTALIGN_CENTER } },
                { Values = { "THIS IS A LABEL", "with hori & vert centered text!" }, Lines = 2 } )


You can align to the TOP and BOTTOM using the same tag, here are all possible alignments:
Code:
#TEXTALIGN_LEFT               ;                   Align text to the left
#TEXTALIGN_RIGHT              ;                  Align text to the right
#TEXTALIGN_HCENTER            ;   The text will be centered horizontally
#TEXTALIGN_TOP                ;                    Align text to the top
#TEXTALIGN_BOTTOM             ;                 Align text to the bottom
#TEXTALIGN_VCENTER            ;     The text will be centered vertically
#TEXTALIGN_CENTER             ;    Vertically and horizontally centering

You can combine horizontal and vertical alignments freely.
Ask if you need more detailed infos! :wink:


Top
 Profile  
 
 Post subject: Re: Labels
PostPosted: 03 Nov 2008, 19:18 

Joined: 27 May 2008, 19:38
Posts: 67
Location: Dresden / Germany
Ah, great, thanks! To be honest, I have difficulties sometimes to read the documentation ... I can't exactly explain why - probably I read to fast, dunno ... :-/

_________________
CD32 + SX1; AmiKit (WinUAE) + OS3.9


Top
 Profile  
 
 Post subject: Re: Labels
PostPosted: 03 Nov 2008, 20:53 
Site Admin
User avatar

Joined: 22 Mar 2007, 22:50
Posts: 112
...or probably I'm not so good in writing documentation!! :lol:
Anyway just ask, I'm here to answer and improve the library :wink:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron