Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>



Destroy an alert message on anchor click
The code presented here shows an alert message and the TAdvAlertWindow.OnAnchorClick is used to handle the click on the anchor in the alert from where the message is destroyed.
begin with AdvAlertWindow1.AlertMessages.Add do begin Text.Text := 'This is an alert with HTML formatted text and anchor.'; AdvAlertWindow1.Show; end; end; procedure TForm2.AdvAlertWindow1AnchorClick(Sender: TObject; Anchor: string; Item: TMsgCollectionItem); begin AdvAlertWindow1.AlertMessages.FindItemID(item.ID).Free; ShowMessage('Anchor clicked'); end;
procedure TForm2.AdvAlertWindow1AnchorClick(Sender: TObject; Anchor: string; Item: TMsgCollectionItem); begin AdvAlertWindow1.AlertWindow.Hide; ShowMessage('Anchor clicked'); end;