python中的middle_Python wx.EVT_MIDDLE_DCLICK属性代码示例
# 需要导入模块: import wx [as 别名]
# 或者: from wx import EVT_MIDDLE_DCLICK [as 别名]
def __init__(self, parent, id, figure):
"""
Initialise a FigureWx instance.
- Initialise the FigureCanvasBase and wxPanel parents.
- Set event handlers for:
EVT_SIZE (Resize event)
EVT_PAINT (Paint event)
"""
FigureCanvasBase.__init__(self, figure)
# Set preferred window size hint - helps the sizer (if one is
# connected)
l, b, w, h = figure.bbox.bounds
w = math.ceil(w)
h = math.ceil(h)
wx.Panel.__init__(self, parent, id, size=wx.Size(w, h))
# Create the drawing bitmap
self.bitmap = wx.Bitmap(w, h)
DEBUG_MSG("__init__() - bitmap w:%d h:%d" % (w, h), 2, self)
# TODO: Add support for 'point' inspection and plot navigation.
self._isDrawn = False
self.Bind(wx.EVT_SIZE, self._onSize)
self.Bind(wx.EVT_PAINT, self._onPaint)
self.Bind(wx.EVT_KEY_DOWN, self._onKeyDown)
self.Bind(wx.EVT_KEY_UP, self._onKeyUp)
self.Bind(wx.EVT_RIGHT_DOWN, self._onRightButtonDown)
self.Bind(wx.EVT_RIGHT_DCLICK, self._onRightButtonDClick)
self.Bind(wx.EVT_RIGHT_UP, self._onRightButtonUp)
self.Bind(wx.EVT_MOUSEWHEEL, self._onMouseWheel)
self.Bind(wx.EVT_LEFT_DOWN, self._onLeftButtonDown)
self.Bind(wx.EVT_LEFT_DCLICK, self._onLeftButtonDClick)
self.Bind(wx.EVT_LEFT_UP, self._onLeftButtonUp)
self.Bind(wx.EVT_MOTION, self._onMotion)
self.Bind(wx.EVT_LEAVE_WINDOW, self._onLeave)
self.Bind(wx.EVT_ENTER_WINDOW, self._onEnter)
# Add middle button events
self.Bind(wx.EVT_MIDDLE_DOWN, self._onMiddleButtonDown)
self.Bind(wx.EVT_MIDDLE_DCLICK, self._onMiddleButtonDClick)
self.Bind(wx.EVT_MIDDLE_UP, self._onMiddleButtonUp)
self.Bind(wx.EVT_MOUSE_CAPTURE_CHANGED, self._onCaptureLost)
self.Bind(wx.EVT_MOUSE_CAPTURE_LOST, self._onCaptureLost)
self.SetBackgroundStyle(wx.BG_STYLE_PAINT) # Reduce flicker.
self.SetBackgroundColour(wx.WHITE)
python中的middle_Python wx.EVT_MIDDLE_DCLICK属性代码示例相关推荐
- python中string.digits_Python string.hexdigits方法代码示例
本文整理汇总了Python中string.hexdigits方法的典型用法代码示例.如果您正苦于以下问题:Python string.hexdigits方法的具体用法?Python string.he ...
- python中的scaler_Python preprocessing.MaxAbsScaler方法代码示例
本文整理汇总了Python中sklearn.preprocessing.MaxAbsScaler方法的典型用法代码示例.如果您正苦于以下问题:Python preprocessing.MaxAbsSc ...
- python中weekday_Python calendar firstweekday()用法及代码示例
日历模块允许输出类似于程序的日历,并提供与日历相关的其他有用功能. "日历"模块中定义的函数和类使用理想化的日历,当前的公历日历在两个方向上都无限期扩展. 在Python中,cal ...
- python中np zeros_Python numpy.zeros方法代码示例
本文整理汇总了Python中numpy.zeros方法的典型用法代码示例.如果您正苦于以下问题:Python numpy.zeros方法的具体用法?Python numpy.zeros怎么用?Pyth ...
- python中perf_counter_Python time.perf_counter()用法及代码示例
由于时间模块提供了各种与时间有关的功能.因此,有必要导入时间模块,否则会出错,因为时间模块中存在perf_counter()的定义. perf_counter()函数始终以秒为单位返回时间的浮点值.返 ...
- python中reshape_python numpy reshape用法及代码示例
在不更改数据的情况下为数组赋予新的形状. 参数:a: : array_like 要重塑的数组. newshape: : int 或 tuple of ints 新形状应与原始形状兼容.如果是整数,则结 ...
- python settings模块_Python settings.VERSION属性代码示例
# 需要导入模块: import settings [as 别名] # 或者: from settings import VERSION [as 别名] def test_version(self): ...
- python quit()讲解_Python locals.QUIT属性代码示例
# 需要导入模块: from pygame import locals [as 别名] # 或者: from pygame.locals import QUIT [as 别名] def update( ...
- python colors后面_Python colors.BASE_COLORS属性代码示例
# 需要导入模块: from matplotlib import colors [as 别名] # 或者: from matplotlib.colors import BASE_COLORS [as ...
最新文章
- 编程之美2.15 二维数组最大子数组的和(数组下标从(1,1)开始)
- 022变量,cp,mv,查看文本命令
- springboot整合oracle_SpringBoot2.x系列教程67--Spring Boot整合分布式事务简介
- android 退出app代码_uniapp退出APP应用(IOS+安卓)
- 测试工程师良品 —— Fiddler 工具简介
- 蓝牙的发展史及版本演进
- 从初恋到生子,聊聊我的十年爱情。
- c++折线平移算法_RSA笔记-蒙哥马利算法(1)
- python通过解释器来编译_python 解释器与编译过程,代码的搬运工
- textarea 的中文输入判断与搜狗输入法的特殊行为
- Hadoop开发环境搭建之Eclipse配置
- 3月28日服务器维护,4月28日服务器例行维护公告
- kali netstat使用教程
- Golang获取时间戳并增加一天
- 计算机识别人脸原理,深入浅出人脸识别原理
- 推荐几个练习键盘打字的工具【自己用过的】
- tipask访问不到地址,appach和linux的引用头不一样
- S-SDLC(Secure Software Development Lifecycle) 安全编码规范
- 常见的百度云搜索引擎入口合集
- keras入门教程 1.线性回归建模(快速入门)