Public Types | |
enum | ButtonFlags |
Public Member Functions | |
bool | Create (Window window, int id, string title, Point pos, Size size, wx.WindowStyles style, string name) |
Sizer | CreateButtonSizer (ButtonFlags flags) |
Sizer | CreateSeparatedButtonSizer (ButtonFlags flags) |
Sizer | CreateStdDialogButtonSizer (ButtonFlags flags) |
Dialog (Window parent, string title, Point pos, Size size, wx.WindowStyles style, string name) | |
Dialog (Window parent, string title, Point pos, Size size, wx.WindowStyles style) | |
Dialog (Window parent, string title, Point pos, Size size) | |
Dialog (Window parent, string title, Point pos) | |
Dialog (Window parent, int id, string title, Point pos, Size size, wx.WindowStyles style, string name) | |
Dialog (Window parent, int id, string title, Point pos, Size size, wx.WindowStyles style) | |
Dialog (Window parent, int id, string title, Point pos, Size size) | |
Dialog (Window parent, int id, string title, Point pos) | |
Dialog (Window parent, int id, string title) | |
Dialog (Window parent, string title) | |
Dialog () | |
Dialog (IntPtr wxObject) | |
void | EndModal (ShowModalResult retCode) |
override void | SetFocus () |
override void | SetFocusFromKbd () |
void | SetIcon (Icon icon) |
virtual ShowModalResult | ShowModal () |
Protected Member Functions | |
override void | CallDTor () |
Properties | |
Window | DefaultItem [get, set] |
bool | Modal [get] |
ShowModalResult | ReturnCode [get, set] |
override string | Title [get, set] |
Dialog Buttons:
The dialog usually contains either a single button allowing to close the dialog or two buttons, one accepting the changes and the other one discarding them (such button, if present, is automatically activated if the user presses the "Esc" key). By default, buttons with the standard MenuIDs.wxID_OK and MenuIDs.wxID_CANCEL identifiers behave as expected. Starting with wxWidgets 2.7 it is also possible to use a button with a different identifier instead, see SetAffirmativeId() and SetEscapeId().
Also notice that the CreateButtonSizer() should be used to create the buttons appropriate for the current platform and positioned correctly (including their order which is platform-dependent).
This is for CreateButtonSizer.
wx.Dialog.Dialog | ( | IntPtr | wxObject | ) |
wx.Dialog.Dialog | ( | ) |
wx.Dialog.Dialog | ( | Window | parent, | |
string | title | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
int | id, | |||
string | title | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
int | id, | |||
string | title, | |||
Point | pos | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
int | id, | |||
string | title, | |||
Point | pos, | |||
Size | size | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
int | id, | |||
string | title, | |||
Point | pos, | |||
Size | size, | |||
wx.WindowStyles | style | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
int | id, | |||
string | title, | |||
Point | pos, | |||
Size | size, | |||
wx.WindowStyles | style, | |||
string | name | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
string | title, | |||
Point | pos | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
string | title, | |||
Point | pos, | |||
Size | size | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
string | title, | |||
Point | pos, | |||
Size | size, | |||
wx.WindowStyles | style | |||
) |
wx.Dialog.Dialog | ( | Window | parent, | |
string | title, | |||
Point | pos, | |||
Size | size, | |||
wx.WindowStyles | style, | |||
string | name | |||
) |
override void wx.Dialog.CallDTor | ( | ) | [protected, virtual] |
This will be called by Dispose() to delete the C++ object. Overload this if you have to use another DTor.
Reimplemented from wx.Object.
Reimplemented in wx.FileDialog, wx.FontDialog, and wx.TextEntryDialog.
bool wx.Dialog.Create | ( | Window | window, | |
int | id, | |||
string | title, | |||
Point | pos, | |||
Size | size, | |||
wx.WindowStyles | style, | |||
string | name | |||
) |
Sizer wx.Dialog.CreateButtonSizer | ( | ButtonFlags | flags | ) |
Creates a sizer with standard buttons. flags is a bit list of the following flags: ButtonFlags.OK, ButtonFlags.CANCEL, ButtonFlags.YES, ButtonFlags.NO, ButtonFlags.HELP, ButtonFlags.NO_DEFAULT.
The sizer lays out the buttons in a manner appropriate to the platform.
This function uses CreateStdDialogButtonSizer internally for most platforms but doesn't create the sizer at all for the platforms with hardware buttons (such as smartphones) for which it sets up the hardware buttons appropriately and returns NULL, so don't forget to test that the return value is valid before using it.
flags | The flags defining the buttons to be present. |
null
if not supportedSizer wx.Dialog.CreateSeparatedButtonSizer | ( | ButtonFlags | flags | ) |
Creates a sizer with standard buttons using CreateButtonSizer() separated from the rest of the dialog contents by a horizontal wx.StaticLine.
Please notice that just like CreateButtonSizer() this function may return null
if no buttons were created.
flags | The flags defining the buttons to be present. |
null
if not supportedSizer wx.Dialog.CreateStdDialogButtonSizer | ( | ButtonFlags | flags | ) |
Creates a wxStdDialogButtonSizer with standard buttons. flags is a bit list of the following flags: ButtonFlags.OK, ButtonFlags.CANCEL, ButtonFlags.YES, ButtonFlags.NO, ButtonFlags.HELP, ButtonFlags.NO_DEFAULT.
The sizer lays out the buttons in a manner appropriate to the platform.
flags | The flags defining the buttons to be present. |
null
if not supportedvoid wx.Dialog.EndModal | ( | ShowModalResult | retCode | ) |
override void wx.Dialog.SetFocus | ( | ) | [virtual] |
override void wx.Dialog.SetFocusFromKbd | ( | ) | [virtual] |
This function is called by wxWidgets keyboard navigation code when the user gives the focus to this window from keyboard (e.g. using TAB key). By default this method simply calls SetFocus
but can be overridden to do something in addition to this in the derived classes. Please note, that this method cannot be overridden from any class. Currently, inheritors of wx.Panel
and wx.Dialog
can override this.
Reimplemented from wx.Window.
void wx.Dialog.SetIcon | ( | Icon | icon | ) |
virtual ShowModalResult wx.Dialog.ShowModal | ( | ) | [virtual] |
Reimplemented in wx.ColourDialog, wx.DirDialog, wx.FileDialog, wx.FontDialog, wx.MessageDialog, and wx.TextEntryDialog.
Window wx.Dialog.DefaultItem [get, set] |
Get or set the default item. This usually is a button.
bool wx.Dialog.Modal [get] |
ShowModalResult wx.Dialog.ReturnCode [get, set] |
Use this to get or set the value that will be returned by this dialog if shown modally.
override string wx.Dialog.Title [get, set] |
Reimplemented from wx.Window.