CEF window does not resize with NSView

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.

CEF window does not resize with NSView

Postby UmairZahid5658 » Mon Jan 10, 2022 4:12 am

I want my CEF window to move as the NSView which is attached with the main window using constraint but my NSView increase with the increase in window but browser view remain same. Can anyone help me to bind the browser view with NSView? The code I do mention below.

Code: Select all
winInfo.setAsChild(of: self.browserView, withRect: CGRect( x: 0, y: 0, width: (view.window?.frame.size.width)!, height: self.browserView.bounds.size.height))
_ = CEFBrowserHost.createBrowser(windowInfo: winInfo, client: newClient, url: URL(string: self.searchField.stringValue ), settings: settings, requestContext: newReq.createContext())


Code: Select all
  @IBOutlet weak var browserView: NSView!


That's my view.
UmairZahid5658
Newbie
 
Posts: 6
Joined: Fri Mar 27, 2020 9:01 am

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 31 guests