[cancelled]standard wxdialog buttons with CreateButtonSizer

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Locked
GianT
Earned some good credits
Earned some good credits
Posts: 124
Joined: Wed Mar 16, 2005 5:44 pm
Location: Guadeloupe, French West Indies
Contact:

[cancelled]standard wxdialog buttons with CreateButtonSizer

Post by GianT » Tue Jun 28, 2005 9:55 pm

Hi all, quote from wxWidgets doc:
wxDialog::CreateButtonSizer
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);
    myDlg->ShowModal();
But no button appears in my dialog box...
Last edited by GianT on Mon Jul 11, 2005 4:41 am, edited 1 time in total.

GianT
Earned some good credits
Earned some good credits
Posts: 124
Joined: Wed Mar 16, 2005 5:44 pm
Location: Guadeloupe, French West Indies
Contact:

Post by GianT » Sun Jul 10, 2005 1:12 am

Errr, no seriously, nobody know how this works? :( :cry:

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4523
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN » Mon Jul 11, 2005 2:00 am

Hi, GianT,
Did you try to create them one at a time?

Thank you.

GianT
Earned some good credits
Earned some good credits
Posts: 124
Joined: Wed Mar 16, 2005 5:44 pm
Location: Guadeloupe, French West Indies
Contact:

Post by GianT » Mon Jul 11, 2005 4:35 am

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:

Locked