RE: [wxpython-users] SetMaxLength for ComboBox
by Kyle W Rickey other posts by this author
May 8 2008 6:59AM messages near this date
Re: [wxpython-users] SetMaxLength for ComboBox
|
Re: [wxpython-users] SetMaxLength for ComboBox
I was thinking this might work:
for child in combo.GetChildren():
if isinstance(child, wx.TextCtrl):
text = child
break
Until I realized that the ComboBox doesn't have any children.
> >> combo.GetChildren()
wxWindowList: []
So I subclassed the wx.ComboBox and made a runnable sample. Maybe this
will get you going in the right direction.
-Kyle Rickey
-----Original Message-----
From: wxpython-users-bounces@[...].org
[mailto:wxpython-users-bounces@[...].org] On Behalf Of Phil
Mayes
Sent: Wednesday, May 07, 2008 8:01 PM
To: wxpython-users@[...].org
Subject: [wxpython-users] SetMaxLength for ComboBox
Hi all,
I want to limit the number of characters typed into the text field of a
CB_DROPDOWN ComboBox. I thought I had seen a way of getting the
TextCtrl
so I can apply SetMaxLength(), but can't find any references to it in
the
archives.
TIA, Phil
_______________________________________________
wxpython-users mailing list
wxpython-users@[...].org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Thread:
Phil Mayes
Robin Dunn
Phil Mayes
Kyle W Rickey
Robin Dunn
|