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:
parent
fad77c99ea
commit
fed1c04a3f
@ -120,6 +120,7 @@ object Form1: TForm1
|
||||
OnMouseLeave = Panel1MouseLeave
|
||||
end
|
||||
object chrmosr: TChromium
|
||||
OnTooltip = chrmosrTooltip
|
||||
OnAfterCreated = chrmosrAfterCreated
|
||||
OnGetViewRect = chrmosrGetViewRect
|
||||
OnGetScreenPoint = chrmosrGetScreenPoint
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user