http://xoomer.virgilio.it/infinity77/AGW_Docs/gallery.html
如果你使用的wxpython版本低于2.8.9.2, 就去这个网站下载对应的控件的源文件。如果高于等于的话,直接使用
import wx.lib.agw
下面是官网的说明和一个例子。
这里说下怎么查看你的wxpython的版本,假设你在windows下面,
打开cmd
进入python的shell模式
import wx
wx.version()
在linux下面把打开cmd的步骤换成启动一个shell,或者终端。
Starting from version 2.8.9.2, AGW has been officially integrated in thewxPython framework, under thewx.lib.agw
package.In order to use one of the AGW widgets, you can simply write:
import wx.lib.agw.customtreectrl as CT #------------------------ # CustomTreeCtrl subclass #------------------------ class CustomTreeCtrl(CT.CustomTreeCtrl): def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.SUNKEN_BORDER, agwStyle=CT.TR_HAS_BUTTONS|CT.TR_HAS_VARIABLE_ROW_HEIGHT): CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, agwStyle) # Do something else in the initialization...Some of the widgets contained in AGW are simply a translation/improvements of existingwxWidgets C++ controls (i.e.,aui or
ultimatelistctrl are a couple ofexamples).版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则按侵权处理.
More from my site