wx.SampleDialogs.MyModelessDialog Class Reference

List of all members.

Public Member Functions

 MyModelessDialog (Window parent)
void OnButton (object sender, Event e)
void OnClose (object sender, Event e)


Detailed Description

Definition at line 870 of file Dialogs.cs.


Constructor & Destructor Documentation

wx.SampleDialogs.MyModelessDialog.MyModelessDialog ( Window  parent  ) 

Definition at line 877 of file Dialogs.cs.

00878                         : base(parent, -1, "Modeless dialog")
00879                 {
00880                         BoxSizer sizerTop = new BoxSizer(Orientation.wxVERTICAL);
00881 
00882                         Button btn = new Button(this, (int)Id.DIALOG_MODELESS_BTN, "Press me");
00883                         CheckBox check = new CheckBox(this, -1, "Should be disabled");
00884                         check.Disable();
00885 
00886                         sizerTop.Add(btn, 1, wx.SizerFlag.wxEXPAND | wx.SizerFlag.wxALL, 5);
00887                         sizerTop.Add(check, 1, wx.SizerFlag.wxEXPAND | wx.SizerFlag.wxALL, 5);
00888 
00889                         AutoLayout = true;
00890                         SetSizer(sizerTop);
00891 
00892                         sizerTop.SetSizeHints(this);
00893                         sizerTop.Fit(this);
00894 
00895                         EVT_BUTTON((int)Id.DIALOG_MODELESS_BTN, new EventListener(OnButton));
00896                         EVT_CLOSE(new EventListener(OnClose));
00897                 }


Member Function Documentation

void wx.SampleDialogs.MyModelessDialog.OnButton ( object  sender,
Event  e 
)

Definition at line 899 of file Dialogs.cs.

00900                 {
00901                         wx.MessageDialog.ShowModal(this, "Button pressed in modeless dialog", "Info",
00902                                 wx.WindowStyles.DIALOG_OK | wx.WindowStyles.ICON_INFORMATION);
00903                 }

void wx.SampleDialogs.MyModelessDialog.OnClose ( object  sender,
Event  e 
)

Definition at line 905 of file Dialogs.cs.

00906                 {
00907                         // must add CloseEvent...
00908                         // must add Event.Veto
00909                 }


Manual of the wx.NET   (c) 2003-2010 the wx.NET project