Modal
A window that pops up to interact with users, often for specific tasks or information gathering. It’s a specialized window used to prompt users for input, display information, or perform actions that require user interaction.
local modal = Modal(window, title)
modal:show()
Note
You can only set one primary layout for each modal
Properties
- setOnShown(callback)
Executed whenever the window is shown or displayed on the screen.
- setOnClose(callback)
Executed when the window is closing.
- Params:
self
andevent
: useignore()
andaccept()
onevent
;event.ignore()
orevent.accept()
- setOnResize(callback)
Executed whenever the window is being resized.
- minimize()
Minimizes or iconifies a window to the system taskbar or dock. It shrinks the window and places an icon representing the window in the taskbar or dock, allowing users to easily restore the window later
- setMinSize(width, height)
Sets the minimum size
- setMaxHeight(height)
Sets the maximum height
- setMinHeight(height)
Sets the minimum height
- setMaxWidth(width)
Sets the maximum width
- setMinWidth(width)
Sets the minimum width
- setMaxSize(width, height)
Sets the maximum size
- setTitle(title)
Sets the title for the window
- setMainWidget(widget)
Sets any widget as the central widget, causing it to take up the available space.
- setSize(width, height)
Sets the size of the window
- setLayout(layout)
Sets a primary layout for the window
- setIcon(path)
Sets the icon for the window
- setFixedSize(width, height)
Sets a fixed size to restrict resizing the window
- show()
Shows the window
- dismiss()
Closes the modal