property OnSelectionChange: TNotifyEvent;
Notifies the host that the text selection has mutated. Fires on every transition where the materialised FSelection ranges differ from the previous state — including empty → non-empty (a drag starts to grab characters), non-empty → empty (ClearSelection, page change, deactivate, document switch), and any range mutation in between (Shift+Right, mouse-move drag extension, double-click word expansion).
Does NOT fire when the same selection is set again (e.g. calling SelectAll twice on the same page). The internal range-equality check short-circuits identical re-application, so the event can be wired directly to status-bar text or button enabled state without debouncing.
procedure TForm1.PdfViewSelectionChange(Sender: TObject);
begin
StatusBar1.Panels[0].Text :=
Format('%d chars selected', [PdfView1.SelectionCharCount]);
CopyButton.Enabled := PdfView1.HasSelection;
end;