modifying wx.Rect() returned from ListCtrl.GetItemRect(item)

kg*2 <[email protected]> Tue, 22 May 2018 11:52:48 -0700 (PDT)
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
Hi,
    I'm having some difficulty modifying the wx.Rect returned from 
ListCtrl.GetItemRect(n).  I'm trying to increase the width of list items in 
a ListCtrl with the LC_ICON flags via

for n, app in enumerate(collection.get_apps()):
    self.applist.InsertItem(n, app.get_name(), ids[n])

    print(self.applist.GetItemRect(n))

    rect = self.applist.GetItemRect(n)
    print(f"old: {rect.GetWidth()}")
    rect.SetWidth(rect.GetWidth()+50)
    self.RefreshRect(rect)
    print(f"new: {rect.GetWidth()}")
    self.applist.RefreshItem(n)


But this doesn't appear to change the actual wx.Rect associated with the list item. I'd like to make the items large enough so that the ListCtrl doesn't truncate the text. Any advice is appreciated.

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.