1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2024-11-24 08:02:15 +02:00

SimpleOSRBrowser now shows tooltips

This commit is contained in:
Salvador Díaz Fau 2018-02-01 18:57:54 +01:00
parent fad77c99ea
commit fed1c04a3f
2 changed files with 9 additions and 0 deletions

View File

@ -120,6 +120,7 @@ object Form1: TForm1
OnMouseLeave = Panel1MouseLeave
end
object chrmosr: TChromium
OnTooltip = chrmosrTooltip
OnAfterCreated = chrmosrAfterCreated
OnGetViewRect = chrmosrGetViewRect
OnGetScreenPoint = chrmosrGetScreenPoint

View File

@ -93,6 +93,7 @@ type
procedure chrmosrPopupShow(Sender: TObject; const browser: ICefBrowser; show: Boolean);
procedure chrmosrPopupSize(Sender: TObject; const browser: ICefBrowser; const rect: PCefRect);
procedure chrmosrAfterCreated(Sender: TObject; const browser: ICefBrowser);
procedure chrmosrTooltip(Sender: TObject; const browser: ICefBrowser; var text: ustring; out Result: Boolean);
procedure SnapshotBtnClick(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
@ -498,6 +499,13 @@ begin
end;
end;
procedure TForm1.chrmosrTooltip(Sender: TObject; const browser: ICefBrowser; var text: ustring; out Result: Boolean);
begin
Panel1.hint := text;
Panel1.ShowHint := (length(text) > 0);
Result := True;
end;
procedure TForm1.ComboBox1Enter(Sender: TObject);
begin
chrmosr.SendFocusEvent(False);