hello! some more questions:
1. what is difference between tchromiumwindow and tcefwindowparent??
2. I have weird things while changing width of tchromiumwindow; I have align=alNone; And I have trouble setting big width. When I set it ~over 1000, the window size changes, but part of browser over 1000px is inactive and grey. I have some other components in my project so I even tried to bring it to front everytime I change size in case something is overlaying it, but its not. MaxWidth is unlimited (default 0).
Your demos have no troubles with big sizes, but use align=client. Any help on my problem?? I can do screenshots. Also, I see some methods like .UpdateSize or .NotifyMoveOrResizeStarted
They didnt seem to help me yet...
I also tried to make on SimpleBrowser demo align=alNone and just made on form resize to set chromium window width:=form.width; worked fine... what can cause a problem in my project ?
3. cookies/cache. how should i write directory? full path or relative? they seem not to be stored in my project directory
Can you give full example? Like GlobalCEFApp.cookies:=...;
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.
chr window width problems
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: chr window width problems
Hi,
It's just a simpler way to create a browser.
If your application is in c:\my projects\my app directory and you set GlobalCEFApp.cookies to 'cef', then the cookies will be stored in c:\my projects\my app directory\cef
You can also use full paths in GlobalCEFApp.cookies like this :
GlobalCEFApp.cookies := 'e:\cookies';
TChromiumWindow inherits from the TCefWindowParent class and includes a TChromium.snoop wrote: Fri Aug 18, 2017 5:42 pm hello! some more questions:
1. what is difference between tchromiumwindow and tcefwindowparent??
It's just a simpler way to create a browser.
Have you tried to create a TPanel with align=alnone and then add a TChromiumWindow with align=alclient inside the TPanel ?snoop wrote: Fri Aug 18, 2017 5:42 pm 2. I have weird things while changing width of tchromiumwindow; I have align=alNone; And I have trouble setting big width. When I set it ~over 1000, the window size changes, but part of browser over 1000px is inactive and grey. I have some other components in my project so I even tried to bring it to front everytime I change size in case something is overlaying it, but its not. MaxWidth is unlimited (default 0).
Your demos have no troubles with big sizes, but use align=client. Any help on my problem?? I can do screenshots. Also, I see some methods like .UpdateSize or .NotifyMoveOrResizeStarted
They didnt seem to help me yet...
I also tried to make on SimpleBrowser demo align=alNone and just made on form resize to set chromium window width:=form.width; worked fine... what can cause a problem in my project ?
You can use full and relative paths.snoop wrote: Fri Aug 18, 2017 5:42 pm 3. cookies/cache. how should i write directory? full path or relative? they seem not to be stored in my project directory
Can you give full example? Like GlobalCEFApp.cookies:=...;
If your application is in c:\my projects\my app directory and you set GlobalCEFApp.cookies to 'cef', then the cookies will be stored in c:\my projects\my app directory\cef
You can also use full paths in GlobalCEFApp.cookies like this :
GlobalCEFApp.cookies := 'e:\cookies';
Re: chr window width problems
hellO! Thank you for reply again.
The problem #2 was because of #1. I was using TChromiumWindow, and it resizes incorrect with cuts. parentwindow works fine!
But I have more questions on #3. I have these settings now:
GlobalCEFApp.Cookies := gsAppPath+'cookies';
GlobalCEFApp.Cache := gsAppPath+'cache';
GlobalCEFApp.SmoothScrolling:=true;
GlobalCEFApp.FastUnload:=true;
GlobalCEFApp.DeleteCache:=false;
GlobalCEFApp.DeleteCookies:=false;
I don't see cookies folder, But I see cookies file in 'cache' folder. is it what i need?
Also, say some words about smoothscrolling and fastunload please.
And also, in which files browser preferences (zoom for example) are stored?
The problem #2 was because of #1. I was using TChromiumWindow, and it resizes incorrect with cuts. parentwindow works fine!
But I have more questions on #3. I have these settings now:
GlobalCEFApp.Cookies := gsAppPath+'cookies';
GlobalCEFApp.Cache := gsAppPath+'cache';
GlobalCEFApp.SmoothScrolling:=true;
GlobalCEFApp.FastUnload:=true;
GlobalCEFApp.DeleteCache:=false;
GlobalCEFApp.DeleteCookies:=false;
I don't see cookies folder, But I see cookies file in 'cache' folder. is it what i need?
Also, say some words about smoothscrolling and fastunload please.
And also, in which files browser preferences (zoom for example) are stored?
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: chr window width problems
Close your app, delete the contents of the 'cache' folder, compile your app and run it.snoop wrote: Tue Aug 22, 2017 10:25 am But I have more questions on #3. I have these settings now:
GlobalCEFApp.Cookies := gsAppPath+'cookies';
GlobalCEFApp.Cache := gsAppPath+'cache';
GlobalCEFApp.SmoothScrolling:=true;
GlobalCEFApp.FastUnload:=true;
GlobalCEFApp.DeleteCache:=false;
GlobalCEFApp.DeleteCookies:=false;
I don't see cookies folder, But I see cookies file in 'cache' folder. is it what i need?
If you have write privileges in that directory you should see a 'cookies' folder next to the 'cache' folder.
SmoothScrolling : This property appends a '--enable-smooth-scrolling' command line switch which enables smooth scroll animation on platforms that support it.snoop wrote: Tue Aug 22, 2017 10:25 am Also, say some words about smoothscrolling and fastunload please.
FastUnload : This property appends a '--enable-fast-unload' command line switch which enables the fast unload controller that speeds up tab/window close by running a tab's onunload js handler independently of the GUI.
For more information about TCEFApplication properties read this :
https://www.briskbard.com/index.php?lang=en&pageid=cef
Many of them are used in the CEF initialization :
http://magpcss.org/ceforum/apidocs3/pro ... ngs_t.html
More command line switches can be found here, but not all of them work in CEF :
http://peter.sh/experiments/chromium-co ... -switches/
https://bitbucket.org/chromiumembedded/ ... ew-default
Some preferences are stored by the chromium engine, probably in the TCEFApplication.UserDataPath directory.snoop wrote: Tue Aug 22, 2017 10:25 am And also, in which files browser preferences (zoom for example) are stored?
The rest must be stored by your application.