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.

How to add a statusbar in FMXTabbedBrowser

Post Reply
nbuyer
Posts: 3
Joined: Mon Dec 19, 2022 1:42 am

How to add a statusbar in FMXTabbedBrowser

Post by nbuyer »

Hi,
Thank you for the wonderful work!
I am new to CEF4Delphi and I am still trying to understand the mechanism of it.

Today I tried to add a standard FMX TStatusbar in the main form of the FMXTabbedBrowser project. But the result was not my expectation since the browser covered the statusbar. What is the correct way to add a statusbar to this project?

BTW, I found the left top corner position is not correct in my environment(I am not sure if it is because I use Win11). So I changed the code like this:
function TBrowserFrame.GetFMXWindowParentRect : System.Types.TRect;
begin
...
Result.Left := round(TempRect.Left {* TempScale}); // commented * TempScale
Result.Top := round(TempRect.Top {* TempScale});
...
The TempScale is 2.0 in my situation.

D11.1
Windows 11

TIA
Edward
zaqaz
Posts: 15
Joined: Wed Nov 30, 2022 8:59 pm

Re: How to add a statusbar in FMXTabbedBrowser

Post by zaqaz »

align = bottom?
nbuyer
Posts: 3
Joined: Mon Dec 19, 2022 1:42 am

Re: How to add a statusbar in FMXTabbedBrowser

Post by nbuyer »

Thank you for your reply. But TStatusBar actually has a default align value which is Bottom.
I thought the problem might be TBrowserFrame.GetFMXWindowParentRect and I tried to change its Result.Bottom value but the output was most part of TStatusBar not updating correctly. I know the reason should be WindowParentLay's align value is "Client" but I am not sure what's the best way solve this problem. That was the reason I ask for help here.
Screenshot.jpg
Screenshot 1.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by nbuyer on Wed Dec 21, 2022 7:49 pm, edited 3 times in total.
zaqaz
Posts: 15
Joined: Wed Nov 30, 2022 8:59 pm

Re: How to add a statusbar in FMXTabbedBrowser

Post by zaqaz »

check all alings.

i think problem on pagecontol?
try use more panels
nbuyer
Posts: 3
Joined: Mon Dec 19, 2022 1:42 am

Re: How to add a statusbar in FMXTabbedBrowser

Post by nbuyer »

Thank you for your reply.
I tried a bottom-aligned TPanel and got the same result. The TabControl is just fine since its alignment is already client.
Screenshot1.jpg
Screenshot2.jpg
Screenshot4.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: How to add a statusbar in FMXTabbedBrowser

Post by salvadordf »

Hi,

Thanks for reporting this issue!

I just uploaded the fix to GitHub. Please, download CEF4Delphi again and see the changes in FMXTabbedBrowser and SimpleFMXBrowser.

FMXTabbedBrowser and SimpleFMXBrowser now have a status bar.
nbuyer
Posts: 3
Joined: Mon Dec 19, 2022 1:42 am

Re: How to add a statusbar in FMXTabbedBrowser

Post by nbuyer »

Thanks!
Post Reply