Re: Alignment of text within a label

ofey aikon wrote:

How do I get the text in a label aligned to the left rather than to
the middle. In the following example, I have a vbox and I want the
text of both labels to be left aligned.

$small->set_justify('left'); # I thought this'll do it but it doesn't
What you need is $small->set_alignment(0, 0.5)

The first argument controls horizontal alignment, and 0 makes it align to the right. The second specified vertical alignment, and 0.5 makes it vertically centered. 0 will make it align to the top.

Only a fool has no doubts.

ekalin bol com br

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]