contents up previous next

wxstddialogbuttonsizer

this class creates button layouts which conform to the standard button spacing and ordering defined by the platform or toolkit's user interface guidelines (if such things exist). by using this class, you can ensure that all your standard dialogs look correct on all major platforms. currently it conforms to the windows, gtk+ and mac os x human interface guidelines.

when there aren't interface guidelines defined for a particular platform or toolkit, wxstddialogbuttonsizer reverts to the windows implementation.

to use this class, first add buttons to the sizer by calling addbutton (or setaffirmativebutton, setnegativebutton, or setcancelbutton) and then call realize in order to create the actual button layout used. other than these special operations, this sizer works like any other sizer.

if you add a button with wxid_save, on mac os x the button will be renamed to "save" and the wxid_no button will be renamed to "don't save" in accordance with the mac os x human interface guidelines.

derived from

wxboxsizer
wxsizer
wxobject

include files

<wx/sizer.h>

see also

wxsizer, sizer overview, wxdialog::createbuttonsizer

wxstddialogbuttonsizer::wxstddialogbuttonsizer
wxstddialogbuttonsizer::addbutton
wxstddialogbuttonsizer::realize
wxstddialogbuttonsizer::setaffirmativebutton
wxstddialogbuttonsizer::setcancelbutton
wxstddialogbuttonsizer::setnegativebutton


wxstddialogbuttonsizer::wxstddialogbuttonsizer

wxstddialogbuttonsizer()

constructor for a wxstddialogbuttonsizer.


wxstddialogbuttonsizer::addbutton

void addbutton(wxbutton* button)

adds a button to the wxstddialogbuttonsizer. the button must have one of the following identifiers:


wxstddialogbuttonsizer::realize

void realize()

rearranges the buttons and applies proper spacing between buttons to make them match the platform or toolkit's interface guidelines.


wxstddialogbuttonsizer::setaffirmativebutton

void setaffirmativebutton(wxbutton* button)

sets the affirmative button for the sizer. this allows you to use identifiers other than the standard identifiers outlined above.


wxstddialogbuttonsizer::setcancelbutton

void setcancelbutton(wxbutton* button)

sets the cancel button for the sizer. this allows you to use identifiers other than the standard identifiers outlined above.


wxstddialogbuttonsizer::setnegativebutton

void setnegativebutton(wxbutton* button)

sets the negative button for the sizer. this allows you to use identifiers other than the standard identifiers outlined above.