Re: dynamically update choice component?
Alex Tweedly <[email protected]>
| Newsgroups | gmane.comp.python.pythoncard |
|---|---|
| Message-ID | <[email protected]> |
Matthew Richardson wrote:
> Hello,
>
> I figured out how to append to a choice component, but what if you
> want remove an item?
>
Rather embarrassingly, I don't currently have a working PythonCard
installation, so I haven't tested this :-)
It looks as though you can (i.e. need to) do something like
mychoices = self.components.theChoice.items
del mychoices[3]
self.components.theChoice.items = mychoices
Assigning to a choice component's "items" is equivalent to clearing and
then appending the list of items.
--
Alex Tweedly mailto:[email protected] www.tweedly.net
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Pythoncard-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pythoncard-users