FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Tab key in RichEdit Control
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Tab key in RichEdit Control
Posted: Wed Jan 03, 2007 01:29 AM

Hi.

Is there any way to allow the use of the [tab] key to work while in a richtext edit control?

Reinaldo.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Tab key in RichEdit Control
Posted: Wed Jan 03, 2007 06:21 PM
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

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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion