how to remove Tag
Posted: Fri Dec 02, 2005 4:00 am
Trichview.addtag(str,i,i);
,
how to remove it when click?
,
how to remove it when click?
Support forums for TRichView, ScaleRichView, Report Workshop and RVMedia components
https://text-ally.com/forums/
Code: Select all
// RichViewEdit1.OnRVMouseMove
procedure TForm3.RichViewEdit1RVMouseUp(Sender: TCustomRichView;
Button: TMouseButton; Shift: TShiftState; ItemNo, X, Y: Integer);
var LRVData: TCustomRVFormattedData;
LItemNo, LOffs: Integer;
LPoint: TPoint;
begin
if (Button<>mbLeft) or Sender.SelectionExists then
exit;
LPoint := Sender.ClientToDocument(Point(X, Y));
if not Sender.GetItemAt(LPoint.X, LPoint.Y, LRVData, LItemNo, LOffs, True) then
exit;
LRVData.SetItemTag(LItemNo, 0);
end;
Code: Select all
procedure TForm3.RichViewEdit1RVMouseUp(Sender: TCustomRichView;
Button: TMouseButton; Shift: TShiftState; ItemNo, X, Y: Integer);
var LRVData: TCustomRVFormattedData;
LItemNo, LOffs: Integer;
LPoint: TPoint;
begin
if (Button<>mbLeft) or Sender.SelectionExists then
exit;
LPoint := Sender.ClientToDocument(Point(X, Y));
if not Sender.GetItemAt(LPoint.X, LPoint.Y, LRVData, LItemNo, LOffs, True) then
exit;
LRVData := TCustomRVFormattedData(LRVData.Edit);
RichViewEdit1.SetItemTagEd(LItemNo, 0);
end;