- class toga.command.Command(action, text=NOT_PROVIDED, shortcut=None, tooltip=None, icon=None, group=None, section=None, order=None, enabled=True, factory=None, label=None)#
action – a function to invoke when the command is activated.
text – caption for the command.
shortcut – (optional) a key combination that can be used to invoke the command.
tooltip – (optional) a short description for what the command will do.
icon – (optional) a path to an icon resource to decorate the command.
group – (optional) a Group object describing a collection of similar commands. If no group is specified, a default “Command” group will be used.
section – (optional) an integer providing a sub-grouping. If no section is specified, the command will be allocated to section 0 within the group.
order – (optional) an integer indicating where a command falls within a section. If a Command doesn’t have an order, it will be sorted alphabetically by text within its section.
enabled – whether to enable the command or not.
- property enabled#
- property icon#
The Icon for the app.
toga.Iconinstance for the app’s icon.
- property key#
A unique tuple describing the path to this command
- property label#
DEPRECATED: renamed as text
The command text as a