[wxPython-users] Dynamically updating GridCellChoiceEditor
combo-box contents?
Raffaello Barella
barbarossa.platz at gmail.com
Wed Mar 12 09:24:52 PDT 2008
It scared me, that anybody could read my code with such care, but you are
right. The new version of my "Append" follows:
def Append(self, item, ItemClientDatum =3D None):
assert type(item) =3D=3D str
self.string_list.append(item)
if not ItemClientDatum is None:
self.clientdata_list.append(ItemClientDatum)
if not self.choice is None:
self.choice.Append(item)
if not ItemClientDatum is None:
self.choice.SetClientData(self.choice.GetCount() - 1,\
ItemClientDatum)
self.clientdata_list.append(ItemClientDatum)
self.choice.Refresh()
Ciao
2008/3/11, Raffaello Barella <barbarossa.platz at gmail.com>:
>
> Hi Tim,
> Sorry, but my code got lost in the inkpot. In the attached text you can
> find the choice editor and renderer I normally use in my applications. Lo=
ok,
> in the editor, to the methods Append(), Delete() and Insert(). If you find
> anything in Italian that you do not understand, please ask.
>
> 2008/3/11, Tim van der Leeuw <tnleeuw at gmail.com>:
> >
> > Hi Raffaello,
> >
> > Thanks for your help. Only I didn't see any attached code to peek at!
> > (And I don't have the book).
> >
> > Could you please do me a favour and mail the code you meant?
> >
> > Thanks a lot,
> >
> > --Tim
> >
> >
> > On Tue, Mar 11, 2008 at 3:54 PM, Raffaello Barella <
> > barbarossa.platz at gmail.com> wrote:
> >
> > > Try to make your own GridCellChoiceEditor (look at chapter 14th in "
> > > wxPython in Action" by Noel Rappin and Robin Dunn, or at my attached =
code if
> > > you do not know how). Create as a variable of the editor the choice-=
list of
> > > the inner wx.Choice, and then a method as follows:
> > > def MakeChoiceList(self, choicelist =3D []):
> > > self.choice_list =3D choicelist
> > >
> > >
> > > 2008/3/11, Tim van der Leeuw <tnleeuw at gmail.com>:
> > >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200803=
12/e02f2713/attachment.htm
More information about the wxpython-users
mailing list