0

I'm trying to use following procedure in Delphi XE2 with Chromium component (version 306):

procedure TForm1.Chromium1BeforeBrowse(Sender: TObject;
  const browser: ICefBrowser; const frame: ICefFrame;
  const request: ICefRequest; navType: TCefHandlerNavtype; isRedirect: Boolean;
  out Result: Boolean);

but it's not working. Delphi doesn't recognize onBeforeBrowse event. Chromium seems to be correctly installed, samples are working, and I'm trying to add onBeforeBrowse event handling in GuiClient sample... Is there that event in Delphi Chromium component ?

TLama
  • 75,147
  • 17
  • 214
  • 392
henry60
  • 463
  • 12
  • 24
  • 1
    What I've posted to your previous question was actually tested in Delphi XE2. Could you be more specific about *doesn't recognize onBeforeBrowse event* ? All the events you can find if you go to the *Events* tab of the *Object Inspector* window. Or what exact error are you getting ? If it's the *E2003 Undeclared identifier: 'ICefBrowser'* (and the similar) then your project doesn't know the path to the Chromium source codes. – TLama May 17 '12 at 20:08
  • @TLama: forget my question.. I press F1 from it.. and got my answer ;o) – Whiler May 17 '12 at 20:23
  • 2
    -1. What does "doesn't recognize" mean? Edit your question to be specific. – Rob Kennedy May 17 '12 at 20:41

2 Answers2

3

Since you've described your problem like not working, go through the all steps:

Community
  • 1
  • 1
TLama
  • 75,147
  • 17
  • 214
  • 392
  • And yes, the screenshots are from Delphi 2009, not from Delphi XE2 (where the 3rd step might be little bit different placed). I don't have Delphi XE2 at hand at this time. – TLama May 17 '12 at 23:45
  • Solved !. The problems was source paths not correctly configured. Thank You very much ! – henry60 May 18 '12 at 07:28
1

Yes.. this event exists. You can find its usage in unit cefvcl. Its type is declared in cefgui, TOnBeforeBrowse.

enter image description here

I'll probably remove my answer later.. just to share the screenshot...

I open the Demo project... double-click on the event OnBeforeBrowse and added the showmessage you can see

Regarding the screenshot.. do not trust the TEdit.. I only change the DefaultUrl property of the TChromium itself ;o)

Whiler
  • 7,998
  • 4
  • 32
  • 56