Home > Back-end >  Delphi Tchromium
Delphi Tchromium

Time:09-19

Write a browser with this control,,,,, search to the entry will pop up a new window, click on the entry,

1: how to implement the click on the entry, directly to the same window displays,,,,

2: how to realize the access to the progress of the search, to the whole progress bar can be presented in the process of loading, after loading disappear,,,,

Please everyone a great god give some hint ~ ~ ~ ~ ~ ~

CodePudding user response:

1. Add in Chromium1 OnBeforePopup events:
 
Result:=True;
Chromium1. Load (targetUrl);

2. In TChromium controls should be no direct access to accurate schedule page load properties, page load accurate schedule not necessary, most mainstream browsers do not display accurate schedule, and display only loading and loaded state (the progress of the download file is different), such as a loading animation to transition, loading condition can be in the event of an onl oadingStateChange judge isLoading value,

CodePudding user response:

reference 1st floor santiaodahan response:
1. Add in Chromium1 OnBeforePopup events:
 
Result:=True;
Chromium1. Load (targetUrl);

2. In TChromium controls should be no direct access to accurate schedule page load properties, page load accurate schedule not necessary, most mainstream browsers do not display accurate schedule, and display only loading and loaded state (the progress of the download file is different), such as a loading animation to transition, loading state can judge isLoading value, in the event of onl oadingStateChange


1 the targetUrl how to get to? ,,,,,,

2 loading animation, can elaborate on it?

CodePudding user response:

refer to the second floor sinat_31964459 response:
Quote: refer to 1st floor santiaodahan response:

1. Add in Chromium1 OnBeforePopup events:
 
Result:=True;
Chromium1. Load (targetUrl);

2. In TChromium controls should be no direct access to accurate schedule page load properties, page load accurate schedule not necessary, most mainstream browsers do not display accurate schedule, and display only loading and loaded state (the progress of the download file is different), such as a loading animation to transition, loading state can judge isLoading value, in the event of onl oadingStateChange

1 the targetUrl how to get to? ,,,,,,
2 loading animation, can elaborate on it?

1. TargetUrl is own events,
2. Can put an Animate control, for example, loading when playing an animation, loaded to stop play, animation can draw,

CodePudding user response:

The
reference 3 floor santiaodahan response:
1. TargetUrl is events bring,
2. Can put an Animate control, for example, loading when playing an animation, loaded to stop play, animation can draw,


I didn't find targetUrl
Chromium1BeforePopup (Sender: TObject;
Const parentBrowser: ICefBrowser; Var popupFeatures: TCefPopupFeatures;
Var windowInfo: TCefWindowInfo; Var url: ustring; Var client: ICefBase;
Out the Result: a Boolean);

Only the url, but use Chromium1. Load (url); This doesn't work,,,, still can't open,,,

Chromium1 can return to the last search content of the event? .

CodePudding user response:

reference 4 floor sinat_31964459 response:
Quote: reference santiaodahan reply: 3/f

1. TargetUrl is own events,
2. Can put an Animate control, for example, loading when playing an animation, loaded to stop play, animation can draw,

I didn't find targetUrl
Chromium1BeforePopup (Sender: TObject;
Const parentBrowser: ICefBrowser; Var popupFeatures: TCefPopupFeatures;
Var windowInfo: TCefWindowInfo; Var url: ustring; Var client: ICefBase;
Out the Result: a Boolean);
Only the url, but use Chromium1. Load (url); This doesn't work,,,, still can't open,,,
Chromium1 can return to the last search content of the event? ,,,

May be a version issue, I have here the parameter targetUrl, including Chromium1. Load (url); Are present, Chromium1 have multiple events related to load pages, OnBeforeXXX, onl oadXXX etc., can track loading page, also can record page address,

CodePudding user response:

The chromium browser is the former chief Delphi Allen Bauer in charge,
  • Related