Skip to main content
Ctrl+K

Ignis

  • User guide
  • API reference
  • Developer Guide
  • Examples
  • GitHub
  • User guide
  • API reference
  • Developer Guide
  • Examples
  • GitHub

Section Navigation

  • Application
  • GObject
  • Variable
  • Client
  • Exceptions
  • D-Bus
  • D-Bus menu
  • BaseWidget
  • BaseService
  • Widgets
    • Arrow
    • ArrowButton
    • Box
    • Button
    • Calendar
    • CenterBox
    • CheckButton
    • DropDown
    • Entry
    • EventBox
    • FileChooserButton
    • FileDialog
    • FileFilter
    • Grid
    • HeaderBar
    • Icon
    • Label
    • ListBox
    • ListBoxRow
    • MenuItem
    • Overlay
    • Picture
    • PopoverMenu
    • RegularWindow
    • Revealer
    • RevealerWindow
    • Scale
    • Scroll
    • Separator
    • SpinButton
    • Switch
    • ToggleButton
    • Window
  • Services
    • Applications
    • Audio
    • Fetch
    • Hyprland
    • MPRIS (media)
    • Network
    • Notifications
    • Options
    • Recorder
    • System Tray
    • Wallpaper
  • Utils
    • FileMonitor
    • Poll
    • ThreadTask
    • Timeout
    • crop_pixbuf
    • download_image
    • exec_sh
    • exec_sh_async
    • get_current_dir
    • get_file_icon_name
    • get_ignis_commit
    • get_ignis_version
    • get_monitor
    • get_n_monitors
    • get_paintable
    • load_interface_xml
    • run_in_thread
    • sass_compile
    • scale_pixbuf
    • thread
  • API reference
  • Widgets
  • DropDown

DropDown#

class ignis.widgets.Widget.DropDown(*args: Any, **kwargs: Any)#

Bases: Gtk.DropDown.

A widget that allows the user to choose an item from a list of options.

Properties:
  • items (list[str], optional, read-write): A list of strings that can be selected in the popover.

  • on_selected (Callable, optional, read-write): Function to call when the user selects an item from the list.

  • selected (str, not argument, read-only): The selected string. It is a shortcut for self.selected_item.props.string.

Widget.DropDown(
    items=["option 1", "option 2", "option 3"],
    on_selected=lambda x, selected: print(selected)
)

previous

CheckButton

next

Entry

On this page
  • DropDown
Edit on GitHub
Show Source

© Copyright 2024, linkfrg.

Created using Sphinx 8.0.2.

Built with the PyData Sphinx Theme 0.15.4.