limekit docs
latest
  • Installation
  • Widgets
    • Accordion
    • Button
    • ButtonGroup
    • Calendar
    • CheckBox
    • ComboBox
    • CommandButton
    • DatePicker
    • Dock
    • DoubleSpinner
    • GifPlayer
    • GroupBox
    • HLine
    • Image
    • Knob
    • Label
    • LineEdit
    • ListBox
    • Menu
      • Properties
        • buildFromTemplate()
    • MenuBar
    • Modal
    • 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
  • Menu
  • Edit on GitHub

Menu

A customizable pop-up menu that appears in response to user actions, such as clicking a button. It provides a list of options or actions for users to choose from, typically displayed as a drop-down menu. Developers can populate a menu with various menu items, submenus and separators to create a hierarchy of actions or choices. Menu is commonly used with other widgets, like buttons or toolbars or the system tray, to offer users a set of actions or options in a neatly organized menu format, improving the usability and functionality of the application.

local menu = Menu()

Properties

buildFromTemplate(template: table)

A powerful features that allows developing complex menus using tables.

local menubar = MenuBar();
menubar:buildFromTemplate({{
      label = '&File',
      submenu = {{
          label = 'New File',
          name = 'new_file',
          shortcut = "Ctrl+N",
          icon = images('newfile.png'),
          click = createFileFunc}}
    },
    {
      label = 'Help',
      submenu = {{
        label = 'About'}}
    }})
Previous Next

© Copyright 2023, Take bytes. Revision 725a7c2a.

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