You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TViewHtmlText当有两个超链接的时候,第二个超链接的点击似乎收不到。下面是我改了代码,不知道是否理解的正确
procedure TViewHtmlText.MouseUp(Sender: TView; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
var
Item: THtmlTextItem;
I: Integer;
begin
//if (Button = TMouseButton.mbLeft) and (FLinkHot >= 0) and (FLinkHot < FLinkHrefs.Count) then begin //如果一段HTML中有两个a的href。则后面的链接收不到click的
if (Button = TMouseButton.mbLeft) and (FLinkHot >= 0) and (FLinkHot < FLinkRangeCount) then begin //这样改两个a href的时候第二个链接才能走到下面
if Assigned(Sender) then begin
for I := 0 to FList.Count - 1 do begin
if FList[I].Link = FLinkHot then begin
Item := FList[I];
Sender.DoLinkClick(Item.Text, FLinkHrefs[Item.LinkURL]);
Break;
end;
end;
end;
end;
end;
The text was updated successfully, but these errors were encountered:
TViewHtmlText当有两个超链接的时候,第二个超链接的点击似乎收不到。下面是我改了代码,不知道是否理解的正确
procedure TViewHtmlText.MouseUp(Sender: TView; Button: TMouseButton;
Shift: TShiftState; X, Y: Single);
var
Item: THtmlTextItem;
I: Integer;
begin
//if (Button = TMouseButton.mbLeft) and (FLinkHot >= 0) and (FLinkHot < FLinkHrefs.Count) then begin //如果一段HTML中有两个a的href。则后面的链接收不到click的
if (Button = TMouseButton.mbLeft) and (FLinkHot >= 0) and (FLinkHot < FLinkRangeCount) then begin //这样改两个a href的时候第二个链接才能走到下面
if Assigned(Sender) then begin
for I := 0 to FList.Count - 1 do begin
if FList[I].Link = FLinkHot then begin
Item := FList[I];
Sender.DoLinkClick(Item.Text, FLinkHrefs[Item.LinkURL]);
Break;
end;
end;
end;
end;
end;
The text was updated successfully, but these errors were encountered: