Re: dynamically update choice component?

Brian Debuire <[email protected]>
Newsgroups gmane.comp.python.pythoncard
Message-ID <[email protected]>
Hi there,
 
I havent test this yet, but I think might work as well
 
del self.components.theChoice.items[3]
 
RegardsBrian DebuireCIO, Kuntur Designswww.kunturcorporation.com/kunturdesigns


Date: Fri, 18 May 2007 19:11:06 +0100From: [email protected]: [email protected]: [email protected]: Re: [Pythoncard-users] dynamically update choice component?
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 = mychoicesAssigning 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
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

-------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.