[wxPython-users] bug in demo python

Frank Niessink frank at niessink.com
Thu Nov 8 11:43:29 PST 2007


Hi Stef,

2007/11/8, Stef Mientki <s.mientki at ru.nl>:
> hello,
>
> In TreeMixin,
> dropping a node item,
> causes the drop target node to get a very small font.
> Appears both in normal Tree and CustomTree.

It's not a bug. The font of items with children is set smaller in the
demo to show how to change the font of items (look at line 72 of the
demo and further):

    def OnGetItemFont(self, indices):
        # Show how to change the item font. Here we use a small font for
        # items that have children and the default font otherwise.
        if self.model.GetChildrenCount(indices) > 0:
            return wx.SMALL_FONT
        else:
            return super(DemoTreeMixin, self).OnGetItemFont(indices)


Cheers, Frank
(Author TreeMixin)




More information about the wxpython-users mailing list