Page 1 of 1

[cancelled]standard wxdialog buttons with CreateButtonSizer

Posted: Tue Jun 28, 2005 9:55 pm
by GianT
Hi all, quote from wxWidgets doc:
wxSizer* CreateButtonSizer(long flags)

Creates a sizer with standard buttons. flags is a bit list of the following flags: wxOK, wxCANCEL, wxYES, wxNO, wxHELP, wxNO_DEFAULT.
This doesn't show any kind of buttons in my wxDialog... How to do that?
I tried

Code: Select all

  wxSizer* sizer1;
   Open_session *myDlg = new  Open_session(NULL);
    sizer1 = myDlg->CreateButtonSizer(wxOK|wxCANCEL);
But no button appears in my dialog box...

Posted: Sun Jul 10, 2005 1:12 am
by GianT
Errr, no seriously, nobody know how this works? :( :cry:

Posted: Mon Jul 11, 2005 2:00 am
Hi, GianT,
Did you try to create them one at a time?

Thank you.

Posted: Mon Jul 11, 2005 4:35 am
by GianT
Hi, thanks for answering. I took a look at the layout sample which uses sizers, and I found a way to create buttons without CreateButtonSizer. Actually, it is possible to create standard buttons with wxButton thanks to their ID.
And it is better to create them one at a time indeed... :lol: