AFXFlyoutButton

This class contains a button that acts like a regular FXButton when pressed and released quickly but displays a popup menu when pressed and held for a short time duration.


AFXFlyoutButton(p, pup=None, act=0, opts=AFXFLYOUT_NORMAL, x=0, y=0, w=0, h=0, pl=0, pr=0, pt=0, pb=0)

Constructor.

ArgumentTypeDefaultDescription
pFXComposite Parent widget.
pupFXPopupNonePopup containing flyout items.
actInt0Current button index (0-based).
optsIntAFXFLYOUT_NORMALOptions and hints.
xInt0X coordinate of origin.
yInt0Y coordinate of origin.
wInt0Width of the widget.
hInt0Height of the widget.
plInt0Left padding (margin).
prInt0Right padding (margin).
ptInt0Top padding (margin).
pbInt0Bottom padding (margin).


canFocus()

Returns True (because a flyout button can receive focus).

Reimplemented from FXWindow.


create()

Creates the flyout button.

Reimplemented from FXLabel.


detach()

Detaches server-side resources for the flyout button.

Reimplemented from FXLabel.


disable()

Disables the flyout button.

Reimplemented from FXLabel.


enable()

Enables the flyout button.

Reimplemented from FXLabel.


getButtonStyle()

Returns the flyout button style.


getCurrentItem()

Returns the current item.


getPane()

Returns the popup menu.


getState()

Returns the flyout button state.


setButtonStyle(style)

Sets the flyout button style.

ArgumentTypeDefaultDescription
styleInt Button style (see Flags for flyout button options.)


setCurrentItem(item)

Sets the current item.

ArgumentTypeDefaultDescription
itemAFXFlyoutItem Item.


setCurrentItem(index, setCheck=False)

Sets the current item and depresses the button if setCheck is True. The specified item index is 0-based, and only valid items are counted (items such as separators are not counted).

ArgumentTypeDefaultDescription
indexInt Index.
setCheckBoolFalseValue of check button.


setPane(pup)

Sets the popup menu.

ArgumentTypeDefaultDescription
pupFXPopup Popup menu.


setState(state)

Sets the flyout button state.

ArgumentTypeDefaultDescription
stateInt State (see FXButton's Button state bits).


Class flags

Message ID's.

ID_AFXFLYOUT_TIMER

ID for the popup timer.

ID_HIDE_ITEM

ID used when hiding flyout item.


Global flags

Flags for flyout button options.

AFXFLYOUT_AUTOGRAY

Automatically gray out when no target.

AFXFLYOUT_AUTOHIDE

Automatically hide when no target.

AFXFLYOUT_TOOLBAR

Toolbar style button.

AFXFLYOUT_HORIZONTAL

Popup horizontal.

AFXFLYOUT_VERTICAL

Popup vertical.

AFXFLYOUT_RADIO

Current item is always active.