Найти - Пользователи
Полная версия: wxPython: TreeListCtrl
Начало » GUI » wxPython: TreeListCtrl
1
axe
смотрю список wx-контролов: http://www.wxpython.org/docs/api/wx.Control-class.html
пробую:
        tree = wx.TreeListCtrl(self, size=(200,100))
получаю:
AttributeError: ‘module’ object has no attribute ‘TreeListCtrl’
а такое дерево:
        tree = wx.TreeCtrl(self, size=(200,100))
нормально добавляется на фрейм

контрола TreeListCtrl просто нет или он лежит где-то в другом месте?

изначальная задача: нужен контрол для отображения вложенной структуры (типа директории/поддиректории)
axe
Из Python in Action:
In addition to the wx.TreeCtrl, wxPython provides the wx.gizmos.TreeListCtrl which is a combination of a tree control and a list control in report mode.
а после
        tree = wx.gizmos.TreeListCtrl(self, size=(200,100))
из консоли:
AttributeError: ‘module’ object has no attribute ‘gizmos’
axe
прошу прощения, тормознул. забыл сделать import wx.gizmos

http://www.wxpython.org/docs/api/wx-module.html - тут есть список модулей, которые лежат внутри пакета wx. надо будет просмотреть.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB