Click "Tab" key to jump between TGTextEdit?

I tried “HandleKey(Event*)”, and ProcessMessage(…), all failed.

Is it any way to do it? And I found there is no kTETab for kCTEXTVIEW in
WidgetMessageTypes.h. And kC_TEXTENTRY has TAB, but do not support

What I want is just like the Frame when you post a new topic. ( Of course,only have 7-8 TGTextEdit ,not too fancy)

Thanks in advance.


You have to implement HandleKey method in your application. I am attaching an example, which does it for TGNumberEnty widgets. You may use a similar way.

Cheers, Ilka
test.tar (20 KB)

Thank you so much. I will definitely try and tell you the result.


The code you sent to me is just what I want.
Now I can get TabPressed() even in the TextEdit area, however I can’t really get focus in next
TextEdit although I insert SetFocus() in the code. What I mean is that I can’t type anything after
I click “TAB” not like what I did if I use your code.

Now Here is the code. I just add my own TGTextEdit Class, and change all TGNumberEntry to
BTW, I put all code in one file and don’t use main()

Just “root -l edittab.cxx++”

Thank you for your time. I appreciate it.
edittab.cxx (9.05 KB)

I disable most HandleEvent( Button, Motion,Selection, Key, ), First I thought the focus problem is related to mouse click event, but not. I found only when the mouse is in the range of TGTextEdit, the textedit actually get focus. But I can’t find what’s the source code related to it.

Is there any clue for me?