Hi.
Is there any way to allow the use of the [tab] key to work while in a richtext edit control?
Reinaldo.
Tab key in RichEdit Control
- reinaldocrespo
- Posts: 918
- Joined: Thu Nov 17, 2005 5:49 pm
- Location: Fort Lauderdale, FL
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Reinaldo,
This is the same problem I mentioned in the other thread. The tab key is trapped in TControl and used to move to the next control. So, you will have to subclass TRichEdit and create a new keyChar() method where you can trap the Tab key before it gets to TControl.
James
This is the same problem I mentioned in the other thread. The tab key is trapped in TControl and used to move to the next control. So, you will have to subclass TRichEdit and create a new keyChar() method where you can trap the Tab key before it gets to TControl.
James
Code: Select all
METHOD KeyChar( nKey, nFlags ) CLASS TRichEdit
if ::lReadOnly
return 0
endif
// Add this section. JB
if nKey == VK_TAB
return 0
endif
Super:KeyChar( nKey, nFlags )
::PostMsg( FM_CHANGE )
if ::lHighlight
::PostMsg( FM_HIGHLIGHT )
endif
return nil