Re: Layout questions with ListCtrl
Tim Roberts <[email protected]> Tue, 8 Dec 2020 19:35:38 -0800
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
On Dec 8, 2020, at 11:07 AM, Michael Eager <[email protected]> wrote: > > I'm trying to use a ListCtrl in a SplitterWindow and I've been having trouble getting it to format correctly. It turns out this isn't confusion caused by the SplitterWindow, but my lack of understanding of layout in ListCtrl. > > I created a simple app (attached) which creates a wx.Frame containing a wx.Panel which has a StaticText and wx.ListCtrl. I've tried setting the column width at two different times (after the ListCtrl is created and after it is filled with data) and two different ways (with fixed size and AUTOSIZE). > > The only one which works is setting AUTOSIZE after filling in data. Setting fixed column widths doesn't work either time. (testopt = 1) Actually, they’re ALL working — it’s doing exactly what you asked. The probiem is that you think the units for the width parameter are characters, whereas it is actually pixels. Your columns are 10 and 20 pixels wide, which is very, very narrow. — Tim Roberts, [email protected] Providenza & Boekelheide, Inc. -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/6961FF93-8316-47AF-A613-BEF9DFB65936%40probo.com.