http://www.perlmonks.org?node_id=1061683
einhverfr has asked for the wisdom of the Perl Monks concerning the following question:

I am writing a point of sale program in wxPerl and having an issue with formatting text using the StaticText control.

I am trying to get labels and numbers to align right, but currently it is not working. I have tried this:

Wx::StaticText->new($self->{WxPanel}, -1, 'Total: ', [10, 280], [90, 24] )->SetWindowStyleFlag(wxALIGN_RIGHT); $self->{total} = Wx::StaticText->new($self->{WxPanel}, -1, $self->{parent_window}->{total}->GetL +abel, [100, 280], [90, 24] ); $self->{total}->SetWindowStyleFlag(wxALIGN_RIGHT);

and this

Wx::StaticText->new($self->{WxPanel}, -1, 'Total: ', [10, 280], [90, 24], wxALIGN_RIGHT); $self->{total} = Wx::StaticText->new($self->{WxPanel}, -1, $self->{parent_window}->{total}->GetL +abel, [100, 280], [90, 24], wxALIGN_RIGHT);

I have also tried refreshing the current pane, all to no avail. What am I doing wrong? What's the preferred way to do this?