Creating a window
Preface
How windows are created
createWindow(params: WindowParams, isAppWindow: Boolean): StandardWindowCreating a basic window
const { register } = w96.app;
const { Theme } = w96.ui;
class BasicWindowTest extends WApplication {
constructor() { super(); }
async main(argv) {
super.main(argv);
// 1. Create the window and assign it to a variable
const mainwnd = this.createWindow({
title: "Basic Window",
body: "this is a very basic window."
}, true);
// 2. Show it
mainwnd.show();
}
}
register({
command: "basic-window-test",
type: "gui",
cls: BasicWindowTest,
meta: {
icon: Theme.getIconUrl("exec"),
friendlyName: "Basic Window Test"
}
});
Last updated