Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Centring text in a WxPerl static text box

by HenryLaw (Initiate)
on Feb 14, 2018 at 08:41 UTC ( #1209114=note: print w/replies, xml ) Need Help??


in reply to Re: Centring text in a WxPerl static text box
in thread Centring text in a WxPerl static text box

> What version are you using?

Perl 5.022001 Wx 0.9923 wxWidgets 3.0.2

> wxALIGN_CENTRE seems to do the trick for me, without it the text is left aligned

When you say "Does the trick", do you mean my code gives you centred text? Aaagh!

> Also, I wouldn't expect a wxVERTICAL box sizer to try to align horizontally :)

Quite so; but I did try the wxALIGN_CENTRE flag on the sizer's Add method, without any obvious difference. And in any case the plan was that the wxALIGN_CENTRE flag on the StaticText box itself was going to do the alignment.

Thinking about what you said, I wonder if the StaticText box is actually only the size of the text, so that centring the text within it has no effect.

  • Comment on Re^2: Centring text in a WxPerl static text box

Replies are listed 'Best First'.
Re^3: Centring text in a WxPerl static text box
by beech (Vicar) on Feb 14, 2018 at 22:52 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1209114]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2018-06-18 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (109 votes). Check out past polls.

    Notices?