Changeset 401 in PSPA for Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc
- Timestamp:
- Mar 27, 2013, 5:47:22 PM (11 years ago)
- Location:
- Interface_Web/trunk/pspaWT
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT
-
Property
svn:mergeinfo
set to
/Interface_Web/branches/12_03_12-managerComboBox/pspaWT merged eligible
-
Property
svn:mergeinfo
set to
-
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_console.cc
r272 r401 3 3 #include <Wt/WApplication> 4 4 #include <Wt/WText> 5 #include <Wt/WBorder> 6 #include <Wt/WLayout> 7 #include <Wt/WPanel> 8 #include <Wt/WScrollArea> 5 9 6 10 GWt_console::GWt_console() … … 8 12 { 9 13 setObjectName("console"); 14 15 // le panel 16 WPanel *panelConsole = new WPanel(this); 17 WScrollArea* container = new WScrollArea(); 18 19 panelConsole->setTitle(" output"); 20 output_ = new WText(this); 21 output_->setTextFormat(PlainText); 22 output_->setInline(false); 23 24 container->setWidget(output_); 25 26 panelConsole->setCentralWidget(container); 27 output_->setMinimumSize(270,100); 28 output_->setMaximumSize(400,400); 29 30 10 31 } 11 32 … … 18 39 void GWt_console::addConsoleMessage(WString msg) { 19 40 20 WText *w = new WText(this); 21 w->setTextFormat(PlainText); 22 w->setText(msg); 23 w->setInline(false); 41 output_->setText(output_->text()+msg); 24 42 25 43 /* 26 44 * Little javascript trick to make sure we scroll along with new content 27 45 */ 28 wApp->doJavaScript( this->jsRef() + ".scrollTop += "29 + this->jsRef() + ".scrollHeight;");46 wApp->doJavaScript(output_->jsRef() + ".scrollTop += " 47 + output_->jsRef() + ".scrollHeight;"); 30 48 31 49 }
Note: See TracChangeset
for help on using the changeset viewer.