salvadordf / CEF4Delphi

CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS.
https://www.briskbard.com/forum/
Other
1.21k stars 368 forks source link

Ask me about using ICefView #491

Closed sxmxta closed 10 months ago

sxmxta commented 10 months ago

Hello @salvadordf

I've tried to use ICefView, ICefButton, ICefMenuButton, and I'm using them as UI widgets, I think they can be used on the screen window, like LCL widgets

But I don't understand them, they don't appear in the window, and I can't show them in ViewFramework.

Can you provide an example for reference? Just provide how they can be used.

Thank you.

salvadordf commented 10 months ago

Hello,

We have two demos that use the views framework : TinyBrowser and ToolBoxBrowser2. If I remember correctly, TinyBrowser is a translation of cefsimple.

I just created the Views Framework components as TComponent descendants because I haven't investigated how to edit them graphically in the IDE. If you know how to do that, please, let me know! :D

The demos show how to use them when you create them at runtime.

See this graphic to understand their relationship.

Notice that only the components with a CEF creation function are registered in the IDE.

Read the code comments in the uCEFInterfaces unit.

Read the code comments in uCEFBrowserViewComponent, uCEFLabelButtonComponent, uCEFMenuButtonComponent, uCEFPanelComponent, uCEFTextfieldComponent, uCEFScrollViewComponent and uCEFWindowComponent for more information about the registered components.

The official cefclient application has all the code to create all the UI using the views framework but we only have 2 demos at the moment.

If you have more questions, please use our forum.