Toolbar

class Location
TOP = 2

Top Dockbar.

BOTTOM = 3

Bottom Dockbar.

LEFT = 5

Left Dockbar.

Toolbar

class Toolbar
property id

The id of the Toolbar.

Type

str, read-only

property name

The name of the Toolbar.

Type

str, read-only

property visible

The visible state of the Toolbar.

Type

bool

property location

The location of the Toolbar.

Type

Location

Raises

ReadOnlyError -- If Database is in read only mode.

list_actions()

List buttons of the Toolbar.

Returns

The list of buttons.

Return type

list(Button)

find_action(name)

Find a button by name.

Parameters

name (str) -- The button name to find.

Returns

The button found or None if not found.

Return type

Button

Raises

NotFoundError -- If name is not matching with any button of the Toolbar.

insert_default_button(name)

Insert action from name in the toolbar

Note

An action can only be added once in the whole interface.

Parameters

name (str) -- The name of the action inserted.

Returns

The button inserted or None if already inserted.

Return type

Button or None

create_custom_button(name)

Create customisable button from name

Note

The button's name must be unique in the whole application.

Parameters

name (str) -- The name of the button.

Returns

The button created.

Return type

CustomButton

create_popup_button(name, execute_on_click=True, set_current_on_click=True)

Create popup button from name

Note

The button's name must be unique in the whole application.

Parameters
  • name (str) -- The name of the button.

  • execute_on_click (bool) -- Lauch the action clicked in the popup.

  • set_current_on_click (bool) -- Select the action clicked in the popup.

Returns

The button created.

Return type

PopupButton

create_tiny_popup_button(name, show_label=True)

Create tiny popup button from name

Note

The button's name must be unique in the whole application.

Parameters
  • name (str) -- The name of the button.

  • show_label (bool) -- If the popup will show the label.

Returns

The button created.

Return type

TinyPopupButton

create_cycle_button(name)

Create cycle button from name

Note

The button's name must be unique in the whole application.

Parameters

name (str) -- The name of the button.

Returns

The button created.

Return type

CycleButton

insert_separator()

Insert separator in the toolbar.

insert_spacer(size)

Insert spacer in the toolbar.

Parameters

size (int) -- The spacer's size in px.