Creating a browser
Code: Select all
TChromMod = class(TComponent)
private
FChromium: TChromium;
.....
procedure GetViewRect(Sender : TObject; const browser : ICefBrowser; var rect : TCefRect);
.....
Code: Select all
procedure TForm1.chrmosrGetViewRect( Sender : TObject;
const browser : ICefBrowser;
var rect : TCefRect);
var
TempScale : single;
begin
TempScale := Panel1.ScreenScale;
rect.x := 0;
rect.y := 0;
//rect.width := DeviceToLogical(Panel1.Width, TempScale);
//rect.height := DeviceToLogical(Panel1.Height, TempScale);
end;
When I create a browser myself, the GetViewRect procedure does not work correctly.
https://browsersize.com/ Result - Browser window size: 1261 x 946 (TBufferPanel = 465 x 535)
I haven't used this method for a long time, but everything used to work with the same code.
What could be the problem?