Hi Julian,
i run into some trouble with TWPRichEdit.SetPosition and GetPosition. If i try to restore a previous saved position SetPosition sets the cursor to the wrong position. It this a bug or do i something wrong here?
The behaviour ist reproducable by the following code:
(WP is a TWPRichEdit)
...
ShowMessage(IntToStr(WP.CPPosition));
WP.GetPosition(pos, lin, par, pos_in_par);
WP.CPPosition := 0;
WP.SetPosition(pos, lin, par, pos_in_par);
ShowMessage(IntToStr(WP.CPPosition));
...
If this is a bug the solution seems very easy . I commented out the following line in WPCTRMemo.pas ~ line 16372 and it works for me.
if //-> this is maby wrong: (topos <> 0) or
((tolin = 0) and (topar = 0) and (topos_in_par = 0))
Greetings
Andy