Re: Class hierarchy for thumbnailctrl
Andrea Gavana <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <CAEf70bxSJyrhgotOfCWZzgP0khY3NDj0eo0C=Qt=648njt243Q@mail.gmail.com> |
Hi, On Sat, 5 Sep 2020 at 23.24, Michael Eager <[email protected]> wrote: > I was looking at the example code for the thumbnailctrl class and > > reading at the documentation so I could understand how to use it. > > The class documentation is at > > > https://wxpython.org/Phoenix/docs/html/wx.lib.agw.thumbnailctrl.ThumbnailCtrl.html#wx.lib.agw.thumbnailctrl.ThumbnailCtrl > > or https://wxpython.org/Phoenix/docs/html/wx.lib.agw.thumbnailctrl.html > > > > The two descriptions of the ThumbnailCtrl widget are different, which is > > confusing. More confusing is that many of the methods used in the > > example were not listed in the class documentation. I found these > > methods defined in the ScrolledThumbnailCtrl, but neither ThumbnailCtrl > > or ScrolledThumbnail are in same inheritance tree. ThumbnailCtrl > > inherits from Panel, while ScrolledThumbnailCtrl inherits from > > ScrolledWindow. > > > > It was not clear when or how ScrolledThumbnailCtrl was supposed to be > > used. (It now appears that it should not be used.) > > > > When I looked at the code for ThumbnailCtrl, I saw it contains an > > instance of ScrolledThumbnailCtrl and that many of the latter's methods > > are copied into the method list for ThumbnailCtrl. > > > > Can anyone explain why this is being done? It would seem cleaner (and > > definitely more understandable) to have ThumbnailCtrl inherit from > > ScrolledThumbnail and Panel. > It’s been a long time since I’ve looked at the ThumbnailCtrl code, but I don’t think there is any issue in changing the implementation so that ThumbnailCtrl inherits from wx.Panel and ScrolledThumbnail. I agree it would be much neater that way... If you can put together a pull request and see if things work correctly I’m pretty sure Robin will consider it for merging. Andrea. > > > -- > > Michael Eager > > > > -- > > 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/6ef64f80-f234-6cde-e0d9-df0d52bd138a%40eagercon.com > . > > -- 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/CAEf70bxSJyrhgotOfCWZzgP0khY3NDj0eo0C%3DQt%3D648njt243Q%40mail.gmail.com.