Sizer no longer Centering

Andre F <[email protected]>
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <CANdLyG1Jh7jZ0ky59g-V2TDmRWFtOggMAs1jaoKTRpA3jqMOmg@mail.gmail.com>
Hello,

I had everything working perfectly, but I didn't like some of the buttons
being displayed horizontally across the screen.  I wanted them to be
vertically aligned to the left of the rest of the screen.  I created two
vertical sizers nested inside a Horizontal sizer.  Everything works except
now when I try to center the stuff for the right sizer(RSizer).  It just
doesn't center anymore.  Before changing to the Horizontal and 2 Vertical
sizers everything worked fine and everything was centered regardless of the
size(Max or whatever).  Now RSizer doesn't center, regardless of size.

Can someone please help me out?

auto Sizer = new wxBoxSizer(wxHORIZONTAL);
auto Lbtnsizer = new wxBoxSizer(wxVERTICAL);
auto RSizer = new wxBoxSizer(wxVERTICAL);


wxFlexGridSizer *p2rowOne = new wxFlexGridSizer(9, 0, 0); // new,soon,now
wxFlexGridSizer *p2rowTwo = new wxFlexGridSizer(9, 0, 0); // new,soon,now

wxFlexGridSizer *p2rowThree = new wxFlexGridSizer(3, 0, 0); // cstm5,6,7
vocab text boxes
wxFlexGridSizer *p2rowFour = new wxFlexGridSizer(15, 0, 0);// idk ez
wxFlexGridSizer *p2rowFive = new wxFlexGridSizer(3, 0, 0);// cstm9,10,11
vocab text boxes
wxFlexGridSizer *p2rowSix = new wxFlexGridSizer(15, 0, 0);// idk ez

    wxGridBagSizer * p2rowSeven = new wxGridBagSizer(3, 25);
    wxGridBagSizer * p2rowEight = new wxGridBagSizer(3, 25);
    wxGridBagSizer * p2rowNine = new wxGridBagSizer(3, 25);
    wxGridBagSizer * p2rowEleven = new wxGridBagSizer(3, 25);
    wxGridBagSizer * p2rowTwelve = new wxGridBagSizer(3, 25);
    wxGridBagSizer * p2rowThirteen = new wxGridBagSizer(3, 25);

// buttons, textctrl's, etc...  Nothing changed here.


RSizer->Add(p2rowOne, wxSizerFlags().Center());
RSizer->Add(p2rowTwo, wxSizerFlags().Center());
RSizer->Add(p2rowThree, wxSizerFlags().Center());
RSizer->Add(p2rowFour, wxSizerFlags().Center());
RSizer->Add(p2rowFive, wxSizerFlags().Center());
RSizer->Add(p2rowSix, wxSizerFlags().Center());

RSizer->Add(p2rowSeven, wxSizerFlags().Center());

RSizer->Add(p2rowEight, wxSizerFlags().Center());
RSizer->Add(p2rowNine, wxSizerFlags().Center());
RSizer->Add(p2rowEleven, wxSizerFlags().Center());
RSizer->Add(p2rowTwelve, wxSizerFlags().Center());
RSizer->Add(p2rowThirteen, wxSizerFlags().Center());
Sizer->Add(Lbtnsizer, wxSizerFlags().Center());
Sizer->Add(RSizer, wxSizerFlags().Center());

CreateStatusBar();
SetStatusText(_("Ready!"));

panel2->SetSizerAndFit(Sizer);

m_simplebook->AddPage( panel2, "Panel 2", false );

Thank you

-- 
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
--- 
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wx-users/CANdLyG1Jh7jZ0ky59g-V2TDmRWFtOggMAs1jaoKTRpA3jqMOmg%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.