Page 1 of 1

richedit

Posted: Fri Nov 04, 2005 9:14 pm
by jacquet philippe
When i try the richedit samples FWH25 and hit a key from the keyboard
The letter appears 2 times on the screen .
What is wrong ?

Re: richedit

Posted: Fri Nov 04, 2005 9:39 pm
by Enrico Maria Giordano
From an old message of mine:

------------------------------------------
It seems that commenting out

// Super:KeyChar( nKey, nFlags )

from KeyChar() method solves the double character bug:

Code: Select all

METHOD KeyChar( nKey, nFlags ) CLASS TRichEdit

//   Super:KeyChar( nKey, nFlags )

   if ::lReadOnly
      return 0
   endif

   ::PostMsg( FM_CHANGE )

   if ::lHighlight
      ::PostMsg( FM_HIGHLIGHT )
   endif

return nil
Please test it with TESTRTF.PRG.

------------------------------------------

EMG