CefWindow set position and size are not working

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

CefWindow set position and size are not working

Postby rahulchavan10 » Tue Jan 02, 2018 4:15 am

I have created top level CEF window passing CefWindowDelegate as an argument.
Initially my browser show a progressbar at that time I want the window to be 512*230 size and in the middle. And the once the loading is completed I am setting its size and position as par user preferences. But when I set size of CefWindow its not reflecting instantly. It chenges its size only after I drag the window or resize the window.

Can anyone please help.
rahulchavan10
Techie
 
Posts: 29
Joined: Tue Dec 19, 2017 6:03 am

Re: CefWindow set position and size are not working

Postby magreenblatt » Tue Jan 02, 2018 2:01 pm

How are you setting the CefWindow size? Where are you setting the size from?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: CefWindow set position and size are not working

Postby rahulchavan10 » Wed Jan 03, 2018 12:19 am

I am setting the size from Cef8Handler . Actually from web service I get the size (width , height , x and Y) in parameters and then I set it by using SetSize(CefSize) and SetPosition(CefPoint) but it does not reflect in window.
rahulchavan10
Techie
 
Posts: 29
Joined: Tue Dec 19, 2017 6:03 am

Re: CefWindow set position and size are not working

Postby magreenblatt » Wed Jan 03, 2018 12:52 am

Call SetBounds on the CefWindow. See Tests > Other Tests > JavaScript Window Manipulation in cefclient for an example.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: CefWindow set position and size are not working

Postby rahulchavan10 » Thu Jan 04, 2018 8:55 am

That also not working....Can you please provide snippet of the code you are saying as I am not finding the class you mentioned in Cef build.
rahulchavan10
Techie
 
Posts: 29
Joined: Tue Dec 19, 2017 6:03 am

Re: CefWindow set position and size are not working

Postby magreenblatt » Thu Jan 04, 2018 11:36 am

Here's the example code from cefclient: https://bitbucket.org/chromiumembedded/ ... ew-default
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 73 guests

cron