can add and remove items as strings

This commit is contained in:
Darren Ranalli 2002-10-11 07:50:04 +00:00
parent 84f005f040
commit 4d8610f71a

View File

@ -179,6 +179,7 @@ class DirectScrolledList(DirectFrame):
Add this string and extraArg to the list
"""
self['items'].append(item)
if type(item) != type(''):
item.reparentTo(self.itemFrame)
if refresh:
self.refresh()
@ -190,6 +191,7 @@ class DirectScrolledList(DirectFrame):
"""
if item in self["items"]:
self["items"].remove(item)
if type(item) != type(''):
item.reparentTo(hidden)
self.refresh()
return 1