|
From: andrew7 <bd...@us...> - 2006-11-30 01:08:18
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetRichTextBox In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1904/tests/WidgetRichTextBox Modified Files: Main.cpp Log Message: Unicode Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetRichTextBox/Main.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Main.cpp 5 May 2006 17:21:46 -0000 1.16 +++ Main.cpp 30 Nov 2006 01:08:09 -0000 1.17 @@ -15,6 +15,8 @@ class WidgetTest1 : public WidgetFactory< WidgetWindow, WidgetTest1 > { + WidgetRichTextBoxPtr textBox; + public: WidgetTest1() {} @@ -26,6 +28,7 @@ SmartUtil::tstring tmpTxt = textField->getSelection(); this->setText( SmartUtil::tstring( _T( "New selection : " ) ) + tmpTxt + _T( ", " ) + boost::lexical_cast< SmartUtil::tstring >( ( int ) tmp->chrg.cpMin ) + SmartUtil::tstring( _T( ", " ) ) + boost::lexical_cast< SmartUtil::tstring >( ( int ) tmp->chrg.cpMax ) ); + textField->setBackgroundColor( RGB( rand()%255, rand()%255, rand()%255 ) ); return 0; } @@ -41,7 +44,7 @@ richTextBoxCS.location = SmartWin::Rectangle( 100, 100, 300, 300 ); richTextBoxCS.scrollBarHorizontallyFlag = false; richTextBoxCS.scrollBarVerticallyFlag = false; - WidgetRichTextBoxPtr textBox = createRichTextBox( richTextBoxCS ); + textBox = createRichTextBox( richTextBoxCS ); textBox->onKeyPressed( & WidgetTest1::richKeyPressed ); WPARAM wPar = 0; |