direct.gui.DirectScrolledList

from direct.gui.DirectScrolledList import DirectScrolledList, DirectScrolledListItem

Contains the DirectScrolledList class.

See the DirectScrolledList page in the programming manual for a more in-depth explanation and an example of how to use this class.

Inheritance diagram

Inheritance diagram of direct.gui.DirectScrolledList

class DirectScrolledList(parent=None, **kw)[source]

Bases: DirectFrame

__init__(parent=None, **kw)[source]
addItem(item, refresh=1)[source]

Add this string and extraArg to the list

destroy()[source]
getItemIndexForItemID(itemID)[source]
getSelectedIndex()[source]
getSelectedText()[source]
makeAllItems()[source]
notify = <direct.directnotify.Notifier.Notifier object>
recordMaxHeight()[source]
refresh()[source]

Update the list - useful when adding or deleting items or changing properties that would affect the scrolling

removeAllItems(refresh=1)[source]

Remove this item from the panel Warning 2006_10_19 tested only in the trolley metagame

removeAndDestroyAllItems(refresh=1)[source]

Remove and destroy all items from the panel. Warning 2006_10_19 tested only in the trolley metagame

removeAndDestroyItem(item, refresh=1)[source]

Remove and destroy this item from the panel.

removeItem(item, refresh=1)[source]

Remove this item from the panel

scrollBy(delta)[source]
scrollTo(index, centered=0)[source]

scrolls list so selected index is at top, or centered in box

scrollToItemID(itemID, centered=0)[source]
selectListItem(item)[source]
setDecButtonCallback()[source]
setForceHeight()[source]
setIncButtonCallback()[source]
setNumItemsVisible()[source]
setScrollSpeed()[source]
class DirectScrolledListItem(parent=None, **kw)[source]

Bases: DirectButton

While you are not required to use a DirectScrolledListItem for a DirectScrolledList, doing so takes care of the highlighting and unhighlighting of the list items.

__init__(parent=None, **kw)[source]
notify = <direct.directnotify.Notifier.Notifier object>
select()[source]