ResizeBrowser: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
IMr.Wifi..! (talk | contribs) |
||
Line 22: | Line 22: | ||
==Example== | ==Example== | ||
Example for resize browser by command. | |||
<syntaxhighlight lang="lua"> | |||
screenWidth, screenHeight = guiGetScreenSize() | |||
initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, true, false) | |||
addCommandHandler("resize", | |||
function ( width, height ) | |||
local browser = guiGetBrowser(initBrowser) | |||
resizeBrowser(browser,width,height) | |||
end | |||
) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{CEF_functions}} | {{CEF_functions}} |
Revision as of 19:09, 17 March 2018
Script Example Missing Function ResizeBrowser needs a script example, help out by writing one. | |
Before submitting check out Editing Guidelines Script Examples. |
Allows resizing of CEF browsers at runtime.
Syntax
bool resizeBrowser ( browser webBrowser, float width, float height )
Required Arguments
- webBrowser: The browser you want to resize.
- width: The new width of the browser.
- height: The new height of the browser.
Returns
Returns true if the browser is resized successfully, false if there's something wrong.
Example
Example for resize browser by command.
screenWidth, screenHeight = guiGetScreenSize() initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, true, false) addCommandHandler("resize", function ( width, height ) local browser = guiGetBrowser(initBrowser) resizeBrowser(browser,width,height) end )
See Also
- canBrowserNavigateBack
- canBrowserNavigateForward
- createBrowser
- executeBrowserJavascript
- focusBrowser
- getBrowserProperty
- getBrowserSettings
- getBrowserSource
- getBrowserTitle
- getBrowserURL
- injectBrowserMouseDown
- injectBrowserMouseMove
- injectBrowserMouseUp
- injectBrowserMouseWheel
- isBrowserDomainBlocked
- isBrowserFocused
- isBrowserLoading
- isBrowserRenderingPaused
- loadBrowserURL
- navigateBrowserBack
- navigateBrowserForward
- reloadBrowserPage
- requestBrowserDomains
- resizeBrowser
- setBrowserAjaxHandler
- setBrowserProperty
- setBrowserRenderingPaused
- setBrowserVolume
- toggleBrowserDevTools