Undo problems
Posted: Wed Feb 22, 2006 9:45 pm
I'd like to do something like this in code:
I can pass both RVE.RVData and RV.RVData to this method. The problem is, these actions don't show in the undo list for RVE. Do I need to delete the item and reinsert it with new text & style to make undo list pick it up?
If so, is there some way to use the same code for both TRichViewEdit and TRichView? I use both components in my application and I'd like to be able to pass their RVData to the same SetItemText method.
Aleksander
Code: Select all
procedure SetItemText(aRV: TCustomRVData; aItemNo: Integer; const aText: WideString);
begin
if aRV.GetItemTextW(aItemNo) <> aText then begin
aRV.SetItemTextW(aItemNo, aText);
aRV.GetItem(aItemNo).StyleNo := RVSTYLE_MODIFIED;
end;
end;
If so, is there some way to use the same code for both TRichViewEdit and TRichView? I use both components in my application and I'd like to be able to pass their RVData to the same SetItemText method.
Aleksander