I'm using a CustomTreeCtrl with the VirtualTree mixin, in wxPython
2.9.1.1. Using the TR_HIDE_ROOT style doesn't appear to work when
combined with VirtualTree. The mixin docs even say the TR_HIDE_ROOT
style is forced when using VirtualTree, but it remains visible. Even
the 2.9.1.1 Docs & Demos app has it visible in the TreeMixin demo.
Is this a bug or is there a secret to hiding the root I'm missing?
Thanks.
Sounds like a bug. I'm sure that Andrea and/or Frank would appreciate any help you can give in tracking down the cause.
···
On 1/27/11 4:21 AM, Adam Pletcher wrote:
I'm using a CustomTreeCtrl with the VirtualTree mixin, in wxPython
2.9.1.1. Using the TR_HIDE_ROOT style doesn't appear to work when
combined with VirtualTree. The mixin docs even say the TR_HIDE_ROOT
style is forced when using VirtualTree, but it remains visible. Even
the 2.9.1.1 Docs& Demos app has it visible in the TreeMixin demo.
Is this a bug or is there a secret to hiding the root I'm missing?
It's caused by a renaming of style parameters in AGW that's backwards
incompatible. To hide the root of a CustomTreeCtrl the __init__ of
VirtualTree should pass a agwStyle=wx.TR_HIDE_ROOT instead of a
style=wx.TR_HIDE_ROOT.
Since the VirtualTree .__init__ method passes on any keyword
arguments, you should be able to fix this issue yourself by passing
the agwStyle=wx.TR_HIDE_ROOT, like this:
I'm using a CustomTreeCtrl with the VirtualTree mixin, in wxPython
2.9.1.1. Using the TR_HIDE_ROOT style doesn't appear to work when
combined with VirtualTree. The mixin docs even say the TR_HIDE_ROOT
style is forced when using VirtualTree, but it remains visible. Even
the 2.9.1.1 Docs& Demos app has it visible in the TreeMixin demo.
Is this a bug or is there a secret to hiding the root I'm missing?
Sounds like a bug. I'm sure that Andrea and/or Frank would appreciate any
help you can give in tracking down the cause.