Supporting wx.TreeCtrl and wx.ListCtrl style flags in wx.dataview.TreeListCtrl

20 views
Skip to first unread message

Saurabh Bhandiwad

unread,
Jul 21, 2017, 10:15:12 PM7/21/17
to wxPython-users
Hi All,

Just started migrating my application to wxPython4.0.0a3 and facing issue where Style from wx.TreeCtrl are not being honored when used with wx.dataview.TreeListCtrl. As far as I understand wx.dataview.TreeListCtrl is replacement for wx.gizmos.TreeListCtrl and with gizmos I was able use apply Styles flags from TreeCtrl and ListCtrl and get desired formatting.

For example, with gizmos I was able to switch the tradition +/- to a pointer by using wx.TR_TWIST_BUTTON and hide the root by using wx.TR_HIDE_ROOT. Wondering if that is still valid. If not is there a way to achieve such functionalities in wx.dataview.TreeListCtrl?

statsTree = dataview.TreeListCtrl(wx.Panel(), wx.ID_ANY, style=wx.TR_TWIST_BUTTONS|wx.TR_HIDE_ROOT)

I do see these style flags being supported for wx.TreeCtrl.  

Thanks!!
Reply all
Reply to author
Forward
0 new messages