wxpython学习笔记
来源:互联网 发布:ubuntu 不能挂载u盘 编辑:程序博客网 时间:2024/06/09 22:52
1、wx文档查阅:
详细说明:http://wxpython.org/Phoenix/docs/html/index.html
快速查阅索引:http://www.wxpython.org/docs/api/wx-module.html
电子书:wxpython in action
2、为了便于找到资源文件,使当前工作目录与源文件所在位置相同:
os.getcwd()获取当前工作目录;
os.path.dirname(...)获取源文件路径中所在的目录;
os.chdir()改变当前工作目录。
import osprint(os.getcwd())import sysos.chdir(os.path.dirname(sys.argv[0]))print(os.getcwd())
3、关于大图标和小图标:
Windows分两种图标,Linux只有一种。
显示小图标:icon = wx.Icon(name="ICONDEMO.ICO", type=wx.BITMAP_TYPE_ICO,desiredWidth=16,desiredHeight=16);
由文档:desiredWidth (int) – Specifies the desired width of the icon. This parameter only has an effect in Windows where icon resources can contain several icons of different sizes.
desiredHeight (int) – Specifies the desired height of the icon. This parameter only has an effect in Windows where icon resources can contain several icons of different sizes.
4、There are three ways to create the ID numbers used by a widget:
1 Explicitly pass a positive integer into the constructor
2 Get wxPython to create IDs for you using the wx.NewId() function
3 Pass either the global constant wx.ID_ANY or -1 to a widget constructor
- wxPython学习笔记一
- wxPython学习笔记二
- wxPython学习笔记三
- wxPython 学习笔记之一
- wxPython 学习笔记
- wxpython学习笔记
- wxpython学习笔记
- wxpython学习笔记
- python wxpython--学习笔记
- wxPython学习笔记
- wxPython学习笔记1
- wxpython 学习笔记 第一天
- wxPython学习笔记(一)
- wxPython学习笔记(二)
- wxPython学习笔记(三)
- wxPython学习笔记(四)
- wxpython学习笔记(一)
- wxpython in action 学习笔记1
- filter_var() 验证邮箱、ip、url的格式 php
- 2017滴滴出行实习面试总结(测试岗,拿到offer)
- 论docker中 CMD 与 ENTRYPOINT 的区别
- Problem A: 判断操作是否合法(栈和队列)
- Error configuring application listener of class org.springframework.web.context.ContextLoaderListen
- wxpython学习笔记
- 大话设计模式—访问者模式
- 远程桌面mstsc情况下通过\\tsclient\盘符实现内容的拷贝
- monkey事件类命令1
- Leetcode:3. Longest Substring Without Repeating Characters
- 最长公共子序列问题 (LCS)
- 跟我一起学习MySQL技术内幕(第五版):(第一章学习日记7上)
- mycat 瑞士军刀mycat-web详解
- AE入门概念之Dataset,FeatureDataset,GeoDataset,工作空间Workspace……