Hi
I am trying to remember cp position and possible text selection. CP position works fine using markers functionality, but I cant seem to get the selection to work. Is it a bug or am I doing something wrong?
Code
var
nStartID, nSelStartID, nSelEndID: Integer;
bRestoreSel: Boolean;
begin
// rember cp position and selection
nStartID := rteEditor.TextCursor.DropMarker;
nSelStartID := rteEditor.TextCursor.DropMarkerAtSelStart;
nSelEndID := rteEditor.TextCursor.DropMarkerAtSelEnd;
bRestoreSel := rteEditor.HideSelection;
// do something here
rteEditor.HideSelection;
// restore cursor pos and selection
if bRestoreSel then
rteEditor.TextCursor.SelectMarker(nSelEndID, nSelStartID);
rteEditor.TextCursor.GotoMarker(nStartID);
rteEditor.Refresh;
end;
Alles anzeigen
Code should be almost the same as you described in the WPTools5Upgrade.pdf
Im using WPTOOLS [5.19], Delphi 2005