Update of /cvsroot/smartwin/SmartWin/tests/WidgetModalDialog
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26647/tests/WidgetModalDialog
Modified Files:
NumDialog.h
Log Message:
Use IDOK and IDCANCEL buttons in the pure dialog so we get ESC and Enter default keystroke handling.
Index: NumDialog.h
===================================================================
RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetModalDialog/NumDialog.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- NumDialog.h 30 Nov 2006 01:07:36 -0000 1.12
+++ NumDialog.h 18 Mar 2007 13:24:27 -0000 1.13
@@ -218,7 +218,8 @@
setText( _T( "A modal dialog without use of resource files" ) );
onClosing( & PureNumDialog::closing );
- itsCancelButton = createButton();
+ WidgetButton::Seed cancelSeed; cancelSeed.setControlId( IDCANCEL );
+ itsCancelButton = createButton( cancelSeed );
itsCancelButton->setText( _T( "Cancel" ) );
itsCancelButton->onClicked( & PureNumDialog::cancel_clicked );
@@ -228,7 +229,8 @@
itsAnotherModalButton->onClicked( & PureNumDialog::modalFromModalDialog );
#endif
- itsOkButton = createButton();
+ WidgetButton::Seed okSeed; okSeed.setControlId( IDOK );
+ itsOkButton = createButton( okSeed );
itsOkButton->setText( _T( "OK" ) );
itsOkButton->onClicked( & PureNumDialog::ok_clicked );
|