Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

TinyBrowser and DevTools

Post Reply
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

TinyBrowser and DevTools

Post 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);
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: TinyBrowser and DevTools

Post 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.
dilfich
Posts: 330
Joined: Thu Nov 30, 2017 1:17 am

Re: TinyBrowser and DevTools

Post 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?
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: TinyBrowser and DevTools

Post 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
Post Reply