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__(self, parent=None, **kw)[source]
addItem(self, item, refresh=1)[source]

Add this string and extraArg to the list

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

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

removeAllItems(self, refresh=1)[source]

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

removeAndDestroyAllItems(self, refresh=1)[source]

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

removeAndDestroyItem(self, item, refresh=1)[source]

Remove and destroy this item from the panel.

removeItem(self, item, refresh=1)[source]

Remove this item from the panel

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

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

scrollToItemID(self, itemID, centered=0)[source]
selectListItem(self, item)[source]
setDecButtonCallback(self)[source]
setForceHeight(self)[source]
setIncButtonCallback(self)[source]
setNumItemsVisible(self)[source]
setScrollSpeed(self)[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__(self, parent=None, **kw)[source]
notify = <direct.directnotify.Notifier.Notifier object>
select(self)[source]