wx.Dialog Class Reference

Inheritance diagram for wx.Dialog:

wx.Window wx.EvtHandler wx.Object wx.ColourDialog wx.DirDialog wx.FileDialog wx.FindReplaceDialog wx.FontDialog wx.MessageDialog wx.MultiChoiceDialog wx.ProgressDialog wx.SingleChoiceDialog wx.TextEntryDialog wx.Wizard

List of all members.

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]


Detailed Description

A dialog box is a window with a title bar and sometimes a system menu, which can be moved around the screen. It can contain controls and other windows and is often used to allow the user to make some choice or to answer a question.

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).


Member Enumeration Documentation

enum wx::Dialog::ButtonFlags

This is for CreateButtonSizer.

Enumerator:
YES  Show an YES button. This shall be used together either with NO or CANCEL. There is a wxWidgets assertion.
OK  Show an OK button.
NO  Show an NO button. This shall be used together either with DIALOG_YES. There is a wxWidgets assertion.
CANCEL  Show an CANCEL button.
YES_NO  Show YES and NO button.
NO_DEFAULT  Used with NO, makes NO button the default.
FORWARD 
BACKWARD 
RESET 
HELP 
MORE 
SETUP 


Constructor & Destructor Documentation

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 
)


Member Function Documentation

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.

Parameters:
flags The flags defining the buttons to be present.
Returns:
A button sizer or null if not supported

Sizer 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.

Parameters:
flags The flags defining the buttons to be present.
Returns:
A button sizer or null if not supported

Sizer 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.

Parameters:
flags The flags defining the buttons to be present.
Returns:
A button sizer or null if not supported

void wx.Dialog.EndModal ( ShowModalResult  retCode  ) 

override void wx.Dialog.SetFocus (  )  [virtual]

This sets the window to receive keyboard input. 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.

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.


Property Documentation

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.


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads