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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: wxPerl Static Text alignment
by Anonymous Monk on Nov 08, 2013 at 09:16 UTC | |
by einhverfr (Friar) on Nov 08, 2013 at 10:46 UTC | |
by Anonymous Monk on Nov 08, 2013 at 11:57 UTC | |
by Anonymous Monk on Nov 08, 2013 at 11:17 UTC |