Actions and Menus
Classes
- class keysight.ads.de.app.Action
Bases:
object- __init__(title: str, callback: Callable[[Action, Window], None], ui_callback: Callable[[Action, Window], MenuState] | None = None)
Create an action item.
- Parameters:
title (str) – The title of the action item
callback (function) – A function to be called when the menu/action is triggered of signature function(arg : Action, win : Window)
ui_callback (function) – A function called to set the menu/action state function(arg : Action, win : Window)
Example:
>>> def my_callback(action, window_handle): ... print(f'Called from {action} with {window_handle}') >>> menu = Action('Test', my_callback, None)
- is_checkable() → bool
- is_separator() → bool
- property name: str
- property original_shortcut: str
- property shortcut: str
- property tooltip: str