wx.TextCtrl question

Robin Dunn a écrit :

Hugues JEAN-BAPTISTE wrote:

Hi all,

Is it possible (and how) to modify the width of a TextCtrl in a sizer ?
I have tried :
...
t = wx.TextCtrl(self.panel, -1, 'AAAA')
...
t.SetSize(wx.Size(20, -1))
...
This doesn't work !...

Use SetMinSize. This is what the sizers look at (in addition to the "best size" if the control class has one) when calculating how much space to give to an item.

Good, SetMinSize works perfectly !...

Thanks a new time :slight_smile:

Friendly.

···

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)