Webview:center() method


Centers the Webview on the parent widget.

Return value

This function returns no value.

Example

local ui = require "ui" require "webview" -- create a simple Window local win = ui.Window("Webview:center() sample", 640, 480) ui.Webview(win, "https://www.luart.org", 0, 0, 600, 400):center() win:show() -- update the user interface until the user closes the Window repeat ui.update() until not win.visible