FXList

List Widget


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

Construct a list with nvis visible items; the list is initially empty.

ArgumentTypeDefaultDescription
pFXComposite  
nvisInt  
tgtFXObjectNone 
selInt0 
optsIntLIST_NORMAL 
xInt0 
yInt0 
wInt0 
hInt0 


appendItem(text, icon=None, ptr=None, notify=False)

Append new item with given text and optional icon, and user-data pointer.

ArgumentTypeDefaultDescription
textString  
iconFXIconNone 
ptrStringNone 
notifyBoolFalse 


appendItem(item, notify=False)

Append a [possibly subclassed] item to the list.

ArgumentTypeDefaultDescription
itemFXListItem  
notifyBoolFalse 


canFocus()

List widget can receive focus.

Reimplemented from FXWindow.


clearItems(notify=False)

Remove all items from list.

ArgumentTypeDefaultDescription
notifyBoolFalse 


create()

Create server-side resources.

Reimplemented from FXComposite.


deselectItem(index, notify=False)

Deselect item.

ArgumentTypeDefaultDescription
indexInt  
notifyBoolFalse 


detach()

Detach server-side resources.

Reimplemented from FXComposite.


findItem(text, start=-1, flags=SEARCH_FORWARD| SEARCH_WRAP)

Search items for item by name, starting from start item; the flags argument controls the search direction, and case sensitivity.

ArgumentTypeDefaultDescription
textString  
startInt-1 
flagsIntSEARCH_FORWARD| SEARCH_WRAP 


getContentHeight()

Return content height.

Reimplemented from FXScrollArea.


getContentWidth()

Compute and return content width.

Reimplemented from FXScrollArea.


getCurrentItem()

Return current item, if any.


getDefaultHeight()

Return default height.

Reimplemented from FXScrollArea.

Reimplemented in AFXList.


getDefaultWidth()

Return default width.

Reimplemented from FXScrollArea.


getItemData(index)

Return item user-data pointer.

ArgumentTypeDefaultDescription
indexInt  


getItemIcon(index)

Return item icon, if any.

ArgumentTypeDefaultDescription
indexInt  


getItemText(index)

Return item text.

ArgumentTypeDefaultDescription
indexInt  


getListStyle()

Return list style.


getNumItems()

Return the number of items in the list.


getNumVisible()

Return number of visible items.


insertItem(index, text, icon=None, ptr=None, notify=False)

Insert item at index with given text, icon, and user-data pointer.

ArgumentTypeDefaultDescription
indexInt  
textString  
iconFXIconNone 
ptrStringNone 
notifyBoolFalse 


insertItem(index, item, notify=False)

Insert a new [possibly subclassed] item at the give index.

ArgumentTypeDefaultDescription
indexInt  
itemFXListItem  
notifyBoolFalse 


isItemSelected(index)

Return True if item is selected.

ArgumentTypeDefaultDescription
indexInt  


isItemVisible(index)

Return True if item is visible.

ArgumentTypeDefaultDescription
indexInt  


killSelection(notify=False)

Deselect all items.

ArgumentTypeDefaultDescription
notifyBoolFalse 


makeItemVisible(index)

Scroll to bring item into view.

ArgumentTypeDefaultDescription
indexInt  


recalc()

Recalculate layout.

Reimplemented from FXWindow.


removeItem(index, notify=False)

Remove item from list.

ArgumentTypeDefaultDescription
indexInt  
notifyBoolFalse 


replaceItem(index, text, icon=None, ptr=None, notify=False)

Replace items text, icon, and user-data pointer.

ArgumentTypeDefaultDescription
indexInt  
textString  
iconFXIconNone 
ptrStringNone 
notifyBoolFalse 


replaceItem(index, item, notify=False)

Replace the item with a [possibly subclassed] item.

ArgumentTypeDefaultDescription
indexInt  
itemFXListItem  
notifyBoolFalse 


retrieveItem(index)

Return the item at the given index.

ArgumentTypeDefaultDescription
indexInt  


selectItem(index, notify=False)

Select item.

ArgumentTypeDefaultDescription
indexInt  
notifyBoolFalse 


setCurrentItem(index, notify=False)

Change current item.

ArgumentTypeDefaultDescription
indexInt  
notifyBoolFalse 


setItemData(index, ptr)

Change item user-data pointer.

ArgumentTypeDefaultDescription
indexInt  
ptrString  


setItemIcon(index, icon)

Change item icon.

ArgumentTypeDefaultDescription
indexInt  
iconFXIcon  


setItemText(index, text)

Change item text.

ArgumentTypeDefaultDescription
indexInt  
textString  


setListStyle(style)

Change list style.

ArgumentTypeDefaultDescription
styleInt  


setNumVisible(nvis)

Change the number of visible items.

ArgumentTypeDefaultDescription
nvisInt  


Global flags

List styles

LIST_EXTENDEDSELECT

Extended selection mode allows for drag-selection of ranges of items.

LIST_SINGLESELECT

Single selection mode allows up to one item to be selected.

LIST_BROWSESELECT

Browse selection mode enforces one single item to be selected at all times.

LIST_MULTIPLESELECT

Multiple selection mode is used for selection of individual items.

LIST_AUTOSELECT

Automatically select under cursor.