TreeCtrl (platform issues)

I have created a wx.TreeCtrl in wx.SashLayoutWindow. The initializers are as follows:

    #Left Window
    self.leftWindow = wx.SashLayoutWindow(self, 101, wx.DefaultPosition,
                                             wx.Size(120, 1000), wx.NO_BORDER
                                            wx.SW_3D | wx.CLIP_CHILDREN)
    self.leftWindow.SetDefaultSize(wx.Size(120, 1000))
    self.leftWindow.SetOrientation(wx.LAYOUT_VERTICAL)
    self.leftWindow.SetAlignment(wx.LAYOUT_LEFT)
    self.leftWindow.SetSashVisible(wx.SASH_RIGHT, True)
    self.leftWindow.SetExtraBorderSize(3)
    self.leftWindow.Bind(wx.EVT_SASH_DRAGGED_RANGE, self.OnFoldPanelBarDrag,id=101)

#Initialize our tree control.
wx.TreeCtrl.init(self, parent, wx.ID_ANY, wx.DefaultPosition, (-1,-1),
style=wx.TR_HIDE_ROOT|
wx.TR_HAS_BUTTONS
)

On Linux It shows a pointing
arrow towards element but on windows it doesn’t. Is it because of platform library?
On Linux wx.TreeCtrl takes extra space at the backside of button(pointing arrow). Screenshot attached. How do I remove this unwanted
space.

Hello

I have created a wx.TreeCtrl in wx.SashLayoutWindow. The initializers are as follows:

On Linux It shows a pointing arrow towards element but on windows it doesn’t. Is it because of platform library?

Yes, its because the native tree control on Windows uses + and - buttons instead of a twist arrow. There are the TR_TWIST_BUTTONS or TR_MAC_BUTTONS style flags but IIRC they don’t do anything on Windows.

On Linux wx.TreeCtrl takes extra space at the backside of button(pointing arrow). Screenshot attached. How do I remove this unwanted
space.

I think it is just how the control is drawn. So I don’t think there is anything you can do about it.

Cody

···

On Tue, Sep 9, 2008 at 11:02 AM, Prashant Saxena animator333@yahoo.com wrote: