limekit docs
latest
  • Installation
  • Widgets
    • Accordion
    • Button
    • ButtonGroup
    • Calendar
    • CheckBox
    • ComboBox
    • CommandButton
    • DatePicker
    • Dock
    • DoubleSpinner
    • GifPlayer
    • GroupBox
    • HLine
    • Image
    • Knob
    • Label
    • LineEdit
    • ListBox
    • Menu
    • MenuBar
    • Modal
      • Properties
        • setOnShown()
        • setOnClose()
        • setOnResize()
        • minimize()
        • setMinSize()
        • setMaxHeight()
        • setMinHeight()
        • setMaxWidth()
        • setMinWidth()
        • setMaxSize()
        • setTitle()
        • setMainWidget()
        • setSize()
        • setLayout()
        • setIcon()
        • setFixedSize()
        • show()
        • dismiss()
    • ProgressBar
    • RadioButton
    • Scroller
    • Slider
    • SlidingStackedWidget
    • Splitter
    • Spinner
    • Tab
    • Table
    • TextField
    • TimePicker
    • ToolBar
    • VLine
    • Window
  • Widget Items
  • Layout Managers
  • App object
  • Accessing Resources
  • Batteries included
limekit docs
  • Widgets
  • Modal
  • Edit on GitHub

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 and event: use ignore() and accept() on event; event.ignore() or event.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

Previous Next

© Copyright 2023, Take bytes. Revision 725a7c2a.

Built with Sphinx using a theme provided by Read the Docs.