U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Question about GridCtrl
Question about GridCtrl [message #20182] Tue, 24 February 2009 09:54 Go to next message
MatthiasG is currently offline  MatthiasG
Messages: 27
Registered: January 2008
Location: Germany
Promising Member
Hello,

i have a layout consisting of a few EditStrings and a GridCtrl.
How can i get the GridCtrl to set the first cell on input, if the user TABs into it? I mean, focus is first on an EditString field, and user hits TAB. Now the focus gets to the GridCtrl, and i want the GridCtrl to immediately activate the first Cell, without the user having to hit Enter first?

Greetings,
Matthias
Re: Question about GridCtrl [message #20186 is a reply to message #20182] Tue, 24 February 2009 11:51 Go to previous message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

MatthiasG wrote on Tue, 24 February 2009 03:54

Hello,

i have a layout consisting of a few EditStrings and a GridCtrl.
How can i get the GridCtrl to set the first cell on input, if the user TABs into it? I mean, focus is first on an EditString field, and user hits TAB. Now the focus gets to the GridCtrl, and i want the GridCtrl to immediately activate the first Cell, without the user having to hit Enter first?

Greetings,
Matthias


Hi
There is no direct support for this action in GridCtrl, but here's what you can do:
struct MyGridCtrl : GridCtrl {
   virtual void GotFoucs() {
       GridCtrl::GotFocus();
       StartEdit();
   }
}

Previous Topic: Assertion in GridCtrl on Linux
Next Topic: RightClick on HeaderCtrl
Goto Forum:
  


Current Time: Mon Apr 27 12:54:20 GMT+2 2026

Total time taken to generate the page: 0.02107 seconds