Public Member Functions | |
| MyModalDialog (Window parent) | |
| void | OnButton (object sender, Event e) |
Public Attributes | |
| Button | m_btnDelete |
| Button | m_btnFocused |
Definition at line 914 of file Dialogs.cs.
| wx.SampleDialogs.MyModalDialog.MyModalDialog | ( | Window | parent | ) |
Definition at line 919 of file Dialogs.cs.
00920 : base(parent, -1, "Modal dialog") 00921 { 00922 BoxSizer sizerTop = new BoxSizer(Orientation.wxHORIZONTAL); 00923 00924 m_btnFocused = new Button(this, -1, "Default button"); 00925 m_btnDelete = new Button(this, -1, "&Delete button"); 00926 Button btnOk = new Button(this, wxID_CANCEL, "&Close"); 00927 sizerTop.Add(m_btnFocused, 0, wx.SizerFlag.wxALIGN_CENTER | wx.SizerFlag.wxALL, 5); 00928 sizerTop.Add(m_btnDelete, 0, wx.SizerFlag.wxALIGN_CENTER | wx.SizerFlag.wxALL, 5); 00929 sizerTop.Add(btnOk, 0, wx.SizerFlag.wxALIGN_CENTER | wx.SizerFlag.wxALL, 5); 00930 00931 AutoLayout = true; 00932 SetSizer(sizerTop); 00933 00934 sizerTop.SetSizeHints(this); 00935 sizerTop.Fit(this); 00936 00937 m_btnFocused.SetFocus(); 00938 m_btnFocused.SetDefault(); 00939 00940 EVT_BUTTON(-1, new EventListener(OnButton)); 00941 }
| void wx.SampleDialogs.MyModalDialog.OnButton | ( | object | sender, | |
| Event | e | |||
| ) |
Definition at line 943 of file Dialogs.cs.
00944 { 00945 CommandEvent ce = (CommandEvent) e; 00946 00947 if ( ce.EventObject == m_btnDelete ) 00948 { 00949 //m_btnFocused = null; 00950 m_btnDelete.Disable(); 00951 m_btnFocused.Hide(); 00952 } 00953 else if (ce.EventObject == m_btnFocused ) 00954 { 00955 new GetTextFromUser("Dummy prompt", 00956 "Modal dialog called from dialog", 00957 "", this); 00958 } 00959 else 00960 { 00961 e.Skip(); 00962 } 00963 }
Definition at line 917 of file Dialogs.cs.
Definition at line 916 of file Dialogs.cs.
(c) 2003-2010 the wx.NET project