AFXOptionTreeList

This class provides a scrolled list of groups of options that may be toggled on or off as a group or individually.


AFXOptionTreeList(p, nvis, opts=0, x=0, y=0, w=0, h=0, pl=DEFAULT_SPACING, pr=DEFAULT_SPACING, pt=DEFAULT_SPACING, pb=DEFAULT_SPACING, hs=DEFAULT_SPACING, vs=DEFAULT_SPACING)

Constructor.

ArgumentTypeDefaultDescription
pFXComposite Parent widget.
nvisInt Number of visible items of list.
optsInt0Options and hints.
xInt0X coordinate of origin.
yInt0Y coordinate of origin.
wInt0Width of the widget.
hInt0Height of the widget.
plIntDEFAULT_SPACINGLeft padding.
prIntDEFAULT_SPACINGRight padding.
ptIntDEFAULT_SPACINGTop padding.
pbIntDEFAULT_SPACINGBottom padding.
hsIntDEFAULT_SPACINGHorizontal spacing.
vsIntDEFAULT_SPACINGVertical spacing.


addItemFirst(text, tgt=None, msg=0)

Adds a new item with the given text as the first item of the list.

ArgumentTypeDefaultDescription
textString Item text.
tgtFXObjectNoneItem target.
msgInt0Item selector.


addItemLast(text, tgt=None, msg=0)

Adds a new item with the given text as the last item of the list.

ArgumentTypeDefaultDescription
textString Item text.
tgtFXObjectNoneItem target.
msgInt0Item selector.


clearItems()

Removes all items from the list.


computeItemHeight(p=None)

Computes the item size to be used as a base for default height computation.

ArgumentTypeDefaultDescription
pAFXOptionTreeItemNoneItem.


createItem(text, tgt, msg)

Creates a new tree item object.

ArgumentTypeDefaultDescription
textString Item text.
tgtFXObject Item target.
msgInt Item selector.


getContentHeight()

Returns the content height.

Reimplemented from FXScrollWindow.


getContents()

Returns the content window.


getContentWidth()

Returns the content width.

Reimplemented from FXScrollWindow.


getDefaultHeight()

Returns the default height.

Reimplemented from FXScrollArea.


getDefaultWidth()

Returns the default width.

Reimplemented from FXScrollArea.


getFirstItem()

Returns the first root item.


getHSpacing()

Returns the horizontal inter-child spacing.


getLastItem()

Returns the last root item.


getNumItems()

Returns the number of top-level items.


getNumVisible()

Returns the number of visible items.


getPadBottom()

Returns the bottom padding.


getPadLeft()

Returns the left padding.


getPadRight()

Returns the right padding.


getPadTop()

Returns the top padding.


getVSpacing()

Returns the vertical inter-child spacing.


layout()

Recalculates layout.

Reimplemented from FXScrollWindow.


moveContents(x, y)

Moves contents to the specified position.

ArgumentTypeDefaultDescription
xInt X location.
yInt Y location


removeItem(item)

Removes the given item from the list. This method does nothing if the given item does not exist.

ArgumentTypeDefaultDescription
itemAFXOptionTreeItem Item to be removed.


setHSpacing(hs)

Sets the horizontal inter-child spacing.

ArgumentTypeDefaultDescription
hsInt Horizontal spacing.


setNumVisible(nvis)

Sets the number of visible items.

ArgumentTypeDefaultDescription
nvisInt Number of visible items.


setPadBottom(pb)

Sets the bottom padding.

ArgumentTypeDefaultDescription
pbInt Bottom padding.


setPadLeft(pl)

Sets the left padding.

ArgumentTypeDefaultDescription
plInt Left padding.


setPadRight(pr)

Sets the right padding.

ArgumentTypeDefaultDescription
prInt Right padding.


setPadTop(pt)

Sets the top padding.

ArgumentTypeDefaultDescription
ptInt Top padding.


setVSpacing(vs)

Sets the vertical inter-child spacing.

ArgumentTypeDefaultDescription
vsInt Vertical spacing.


Class flags

Message ID's.

ID_CONTENTS

ID for the content window.