self.myImage=wx.StaticBitmap(self, -1, pos=(30,50), size=(292,250)) bmp=wx.Bitmap("myimage.png", wx.BITMAP_TYPE_PNG) self.myImage.SetBitmap(bmp) 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/43271/showart_373743.html
by mystérieux - Python文档中心 - 2007-09-04 06:09:45 阅读(1271) 回复(0)
学用wxpython写界面, 想写个垂直的工具条,我知道有 CreateToolBar() 也有wx.TB_VERTICAL. 可要怎么写个垂直的toolbar? 不要bs我,wxpython的资料好少,我看wxpython in Action,有些地方看的不是很明白.
wxpython怎么配置呀,我装了python?wxpython会自动装在python是里面的目录,我在论坛上搜索过没有看到这个教程,谢谢,!想用GUI学python,用那个gui工具去写python比较好??请推荐!!!! [ 本帖最后由 tianyaamy 于 2006-12-5 12:06 编辑 ]
Hi ! below is a simple code that I modified from WWW. as I run it, first time after I enter a number, it calcutes correct ! from second time on , regardless of whatever I enter a number, it calcutes wrong ! I trace it , seems self.tCalc.GetValue() not effect ! I'm confusing about it. please help & indicate what it is going wrong here. thanks a lot. #!/usr/bin/python import wx # --- Define a cust...
<wxpython in Action> 关于本书就不再做太多的介绍了,想必大家都已经十分清楚了,是一个介绍wxpython编程的经典书籍,英文版的电子书可以在网上下载得到,但是国内一直没有中文译本,在这里推荐一个本书的翻译网站,想来一定会在大家有所帮助的! http://www.pythontik.com/blog/default.asp?tag=wxpython Enjoy it~~ 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/19185/showart_1286811.h...
import wx app = wx.PySimpleApp() frame = wx.Frame(None, wx.ID_ANY, "Hello World") frame.Show(True) app.MainLoop() 这段代码在IDLE运行可以成功,但是在命令提示符下为什么说:N o Module named wx
最近在看python,这个东东。方便快,好用呵呵,推荐大家看看Dive.Into.Python电子书,它在python相当与c++ primer这本书。 Python自带的GUI太不爽了,还是用wxpython吧。 在 wxpython下载 注意选择与您的python版本相对应的wxpython,这里我用的是python2.5选择相对的wxpython. 安装默认的wxpython即可。 来一个hello world吧! “”” Usage: python hello.py “”” import wx #引入wxpython包 app=wx.PySimpleApp() #创...
from wxpython.wx import * def _setupContext( memory, font=None, color=None ): if font: memory.SetFont( font ) else: memory.SetFont( wxNullFont ) if color: memory.SetTextForeground( color ) def write( text, bitmap, pos=(0,0), font=None, color=None): """Simple write into a bitmap doesn't do any checking.""" ...