wxPython笔记(Getting started with wxPython 3)
来源:互联网 发布:数据库 id冗余名称 编辑:程序博客网 时间:2024/05/28 17:07
Getting started with wxPython 3:http://wiki.wxpython.org/Getting%20Started
1. wx.Validator:用于输入数据的验证;首先要创建自己的验证器(从wx.Validator派生),然后与需要验证的控件关联(myInputField.SetValidator(myValidator))。
2. wx.Notebook:通过Tab管理多个页面,这里通过AddPage添加了三个页面,nb是ExamplePanel的父窗口。
app = wx.App(False)frame = wx.Frame(None, title="Demo with Notebook")nb = wx.Notebook(frame)nb.AddPage(ExamplePanel(nb), "Absolute Positioning")nb.AddPage(ExamplePanel(nb), "Page Two")nb.AddPage(ExamplePanel(nb), "Page Three")frame.Show()app.MainLoop()
3.获取调试信息:在创建App时,可传入参数控制调试信息的显示方式。如果程序运行错误,调试信息将会在独立的窗口中显示;也可将这些信息重定向输出到文件中。
class MyApp (wx.App):#...#...#...myapp = MyApp() # functions normally. Stdio is redirected to its own windowmyapp = MyApp(0) #does not redirect stdout. Tracebacks will show up at the console.myapp = MyApp(1, 'filespec') #redirects stdout to the file 'filespec'# NOTE: These are named parameters, so you can do this for improved readability:myapp = MyApp(redirect = 1, filename = 'filespec') # will redirect stdout to 'filespec'myapp = MyApp(redirect = 0) #stdio will stay at the console...
0 0
- wxPython笔记(Getting started with wxPython 3)
- wxPython笔记(Getting started with wxPython 1)
- wxPython笔记(Getting started with wxPython 2)
- wxPython入门中文版 (Getting Started with wxPython)
- wxpython笔记
- wxPython
- wxPython
- wxPython
- wxpython
- wxPython
- wxpython
- wxPython学习笔记(一)
- wxPython学习笔记(二)
- wxPython学习笔记(三)
- wxPython学习笔记(四)
- wxpython学习笔记(一)
- python channels笔记--Getting started with channels
- Unit Testing with wxPython
- unison实现文件双向同步
- iOS开发笔记之四十二——一个double精度导致的bug
- usaco.section1.3 wormhole(枚举)
- oracle处理乱码的问题
- Android--获取标题栏,状态栏,屏幕高度
- wxPython笔记(Getting started with wxPython 3)
- 内存分析
- 微信扫码支付-原生支付-流程图
- opencv-压缩图片
- 数据挖掘算法基础-关联规则
- Android Service和Activity通信
- weblogic创建域(Linux系统)
- 基于HTML5树组件延迟加载技术实现
- GitHub 优秀的 Android 开源项目