-------------------------- 显示隐藏刷新 --------------------------TControl = class(TComponent)procedure Show; 调用 Parent.ShowControl(Self);procedure Refresh;... Read More
posted @ 2014-04-07 17:46 findumars Views(1183) Comments(0) Diggs(0)
写在属于自己的体会,哪怕只是一点点,也是真的懂了。否则有那么多书,如果只是不过脑子的学一遍看一遍,又有谁真的掌握了这些知识呢? 这样你或许就明白了为什么不能直接用SendMessage和PostMessage发送WM_PAINT的原因:由于没有invalidate,系统认为窗口没有更新的必要,于是就 Read More
posted @ 2014-03-26 07:19 findumars Views(3033) Comments(0) Diggs(0)
import wxclass MyFrame(wx.Frame): def __init__(self): wx.Frame.__init__(self, None) self.panel = wx.Panel(self) # create contr... Read More
posted @ 2014-03-26 06:12 findumars Views(977) Comments(0) Diggs(0)
import wximport randomclass View(wx.Panel): def __init__(self, parent): super(View, self).__init__(parent) self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) self.Bind(wx.EVT_PAINT, self.on_paint) self.Bind(wx.EVT_SIZE, self.on_size) def on_size(self, event): # OnSize时重画很棒... Read More
posted @ 2014-03-26 05:49 findumars Views(501) Comments(0) Diggs(0)
import wxclass View(wx.Panel): def __init__(self, parent): super(View, self).__init__(parent) self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM) self.Bind(wx.EVT_SIZE, self.on_size) self.Bind(wx.EVT_PAINT, self.on_paint) def on_size(self, event): # 没有这个事件,改变尺寸的时候就全乱了 ... Read More
posted @ 2014-03-26 05:43 findumars Views(407) Comments(0) Diggs(0)