X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a152561c76dbed50d23f28d6e5761b4ece968156..914955aaa034862c3b9b827463cde26455d06c79:/src/palmos/stattext.cpp?ds=sidebyside diff --git a/src/palmos/stattext.cpp b/src/palmos/stattext.cpp index 789e227e3f..61ec4eb58c 100644 --- a/src/palmos/stattext.cpp +++ b/src/palmos/stattext.cpp @@ -94,7 +94,17 @@ bool wxStaticText::Create(wxWindow *parent, if(!wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name)) return false; - return wxControl::PalmCreateField(label, pos, size, false, false, leftAlign); + // note that wxALIGN_LEFT is equal to 0 so we shouldn't + // test for it using & operator + + JustificationType align = leftAlign; + + if ( style & wxALIGN_CENTRE ) + align = centerAlign ; + else if ( style & wxALIGN_RIGHT ) + align = rightAlign; + + return wxControl::PalmCreateField(label, pos, size, false, false, align); } wxBorder wxStaticText::GetDefaultBorder() const