AFXList

This class is a list widget that allows displaying items in a scrollable window.


AFXList(p, nvis, tgt=None, sel=0, opts=0, x=0, y=0, w=0, h=0)

Constructor.

ArgumentTypeDefaultDescription
pFXComposite Parent widget.
nvisInt Number of visible items.
tgtFXObjectNoneMessage target.
selInt0Message ID.
optsInt0Options and hints.
xInt0X coordinate of origin.
yInt0Y coordinate of origin.
wInt0Width of the widget.
hInt0Height of the widget.


appendItem(text, icon=None, sel=0)

Adds a new item to the end of the list.

ArgumentTypeDefaultDescription
textString  
iconFXIconNone 
selInt0 


disable()

Disables the list.

Reimplemented from FXWindow.


enable()

Enables the list.

Reimplemented from FXWindow.


getAutoCommit()

Returns the auto-commit flag.


getDefaultHeight()

Returns the default height of the list.

Reimplemented from FXList.


getItemIndexForData(data)

Returns the index of the first item with the associated data or -1 if not found.

ArgumentTypeDefaultDescription
data   


getItemProvider()

Returns the provider of the list's items.


getSingleSelection()

Returns the index of the uniquely selected item. If more than one item or no items are selected, returns -1.


insertItem(index, text, icon=None, sel=0)

Inserts a new item at the given index.

ArgumentTypeDefaultDescription
indexInt  
textString  
iconFXIconNone 
selInt0 


replaceItem(index, text, icon=None, sel=0)

Replaces the item at the given index.

ArgumentTypeDefaultDescription
indexInt  
textString  
iconFXIconNone 
selInt0 


setAutoCommit(commit)

Sets the auto-commit option for handling double clicks. This option is turned on by default.

ArgumentTypeDefaultDescription
commitBool  


setItemProvider(cp)

Sets the provider of the list's items.

ArgumentTypeDefaultDescription
cpFXObject  


Global flags

Flags for AFX list options.

AFXLIST_NO_AUTOCOMMIT

Don't automatically commit on double click.