wxBoxSizer Horizontal alignment flags are ignored with wxEXPAND

Newer version of wxWidgets reports error:

 ./src/common/sizer.cpp(2091): assert "!(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))" failed in DoInsert(): Horizontal alignment flags are ignored with wxEXPAND

[1] wxBoxSizer::DoInsert(unsigned long, wxSizerItem*)
[2] WXMSearchReplaceDialog::WXMSearchReplaceDialog(wxWindow*, int, wxPoint const&, wxSize const&) …

wxBoxSizer* BoxSizer2;
BoxSizer2 = new wxBoxSizer(wxVERTICAL);

The fix is removing both like the following:

BoxSizer2->Add(BoxSizer4, 1, wxALL|wxEXPAND, 0);

Another change:

StaticBoxSizer1 = new wxStaticBoxSizer(wxVERTICAL, Panel3, _(“Text Mode”));
StaticBoxSizer1->Add(WxCheckBoxPrintSyntax, 0, wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 1); // remove |wxALIGN_CENTER_VERTICAL

To build wxMEdit-3.1.tar.gz with wxWidgets-3.1.0.tar.bz2:

./configure --with-wx-config=~/oss/wxWidgets-3.1.0/wx-config

There is one place need change:

unsigned long FilePathHash(const wxString& name)
 return wxStringHash::stringHash(FilePathNormalCase(name).wc_str());
This entry was posted in CPP, GUI, Open Source. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s