Page 1 of 1

TinyBrowser and DevTools

Posted: Fri Dec 10, 2021 1:14 pm
by dilfich
Hi, can you tell me how to open DevTools in TinyBrowser in a separate form of the specified size as in the usual version? I don't quite understand how to use PCefWindowInfo. :(

Code: Select all

  FormDev:= TForm.Create(nil);
  FormDev.BorderStyle := bsSizeable;
  FormDev.ClientHeight := 650;
  FormDev.ClientWidth := 850;
  FormDev.OnClose := Form1.OnCloseX;
  FormDev.Show;
  TempPoint.x := low(integer);
  TempPoint.y := low(integer);
  Chromium.ShowDevTools(TempPoint, FormDev);

Re: TinyBrowser and DevTools

Posted: Sat Dec 11, 2021 9:37 am
by salvadordf
Hi,

TinyBrowser uses the "Chrome runtime" mode and that mode is in experimental state. Some features are not implemented in CEF or have issues.

To open the DevTools right-click on the browser to show the context menu and select "Inspect".

You can also try to call Chromium1.ShowDevTools with these parameters :

Code: Select all

        TempPoint.x := low(integer);
        TempPoint.y := low(integer);
        Chromium1.ShowDevTools(TempPoint, nil);
I haven't tested TChromium.ShowDevTools in "Chrome runtime" mode.

Re: TinyBrowser and DevTools

Posted: Mon Dec 13, 2021 8:35 am
by dilfich
I'm sorry, I'm talking about TinyBrowser2.

Code: Select all

 Chromium1.ShowDevTools(TempPoint, nil);
This is understandable, but it's not really that, I'm interested in how to set the window size.
How or what parameters to pass to windowinfo: PCefWindowInfo?

Re: TinyBrowser and DevTools

Posted: Sat Dec 18, 2021 9:16 am
by salvadordf
Copy the WindowInfoAsPopUp function from uCEFMiscFunctions and try setting the dimensions in aWindowInfo.bounds.width and aWindowInfo.bounds.height.

Read the code comments about for _cef_window_info_t more information about that :
https://github.com/chromiumembedded/cef/blob/b76badd958c894cae62ac9817ad8c5cab0a2296d/include/internal/cef_types_win.h#L65