Feature Request - Highlight content of text input when tabbing
by RollerJesus · in Torque Game Builder · 05/12/2010 (8:04 pm) · 2 replies
Just thought I'd put it out there... I'd love it if, in the editor, the content of a text area was selected when you tab to it.
You know you want it too!
You know you want it too!
#2
Thanks Phil!
EDIT: btw, this works perfectly!
05/13/2010 (5:38 am)
Chalk up another reason to have source. :)Thanks Phil!
EDIT: btw, this works perfectly!
Associate Phillip O'Shea
Violent Tulip
guiCanvas.cc
// Includes #include "gui/controls/guiTextEditCtrl.h" bool GuiCanvas::tabNext(void) { ... if ( newResponder && newResponder != oldResponder ) { newResponder->setFirstResponder(); GuiTextEditCtrl *textCtrl = dynamic_cast<GuiTextEditCtrl*>( newResponder ); if ( textCtrl ) { textCtrl->selectAllText(); } ... } ... } bool GuiCanvas::tabPrev(void) { ... if ( newResponder && newResponder != oldResponder ) { newResponder->setFirstResponder(); GuiTextEditCtrl *textCtrl = dynamic_cast<GuiTextEditCtrl*>( newResponder ); if ( textCtrl ) { textCtrl->selectAllText(); } ... } ... }