[wxPython-users] GetMaxLength for text control?

Raffaello Barella barbarossa.platz at gmail.com
Wed Feb 13 03:25:04 PST 2008


Sorry, there was a mishap.

I don't understand it either, but it is like the rain: don't protest in
vain, and open your umbrella.
In the actual case, I suggest you subclass wx.TextCtrl, override the method
SetMaxLength() as follows:
       def SetMaxlength(self, length):
               assert length >=3D 0
               self.MaxLength =3D length
               wx.TextCtrl.SetMaxLength(self, length)

and then you build your getter:
      def GetMaxLength(self):
               return self.MaxLength

2008/2/13, Raffaello Barella <barbarossa.platz at gmail.com>:
>
> I don't understand it either, but it is like the rain: don't protest in
> vain, and open your umbrella.
> In the actual case, I suggest you subclass wx.TextCtrl, override the
> method SetMaxLength() as follows:
>
>
> 2008/2/13, Christopher L. Spencer <chris at roxx.biz>:
> >
> > For various introspection reasons, I need to be able to ask a
> > wx.TextCtrl for the value previously set in
> > wx.TextCtrl.SetMaxLength().  Is there any mechanism available to do
> > this?
> >
> > I don't understand why wxWigets provides a setter for maximum length,
> > but not a getter.
> >
> > Christoper L. Spencer
> > CTO ROXX, LLC
> > 4515 Leslie Ave.
> > Cincinnati, OH
> > 45242
> > TEL: 513-297-1260
> > FAX: 513-297-1280
> > EMAIL: chris at roxx.biz
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200802=
13/9fccd677/attachment.htm


More information about the wxpython-users mailing list