2006年02月11日 星期六 17:47
加粗部分*EVT_MOUSE_EVENTS(self, self.OnEnter)好像没用。* # -*- coding: utf-8 -*- import wx from wxPython.wx import * import wx.lib.iewin as iewin class exFrame (wxFrame): def __init__(self, parent, ID, title): wxFrame.__init__(self,parent,ID,title,wxDefaultPosition,wxSize(300,400) ,style= wx.DEFAULT_FRAME_STYLE | wx.STAY_ON_TOP ) self.timer = wxPyTimer(self.winHide) self.timer.Start(1000) self.screen = (wxSystemSettings.GetMetric(wxSYS_SCREEN_X), wxSystemSettings.GetMetric(wxSYS_SCREEN_X)) self.SetPosition((self.screen[0]-6,100)) *EVT_MOUSE_EVENTS(self, self.OnEnter)* def winHide(self): p = self.GetPosition() s = self.GetClientSize() #print self.GetPosition() rightD = self.screen[0] - p[0] - s[0] if rightD in range(0,20): self.SetPosition((self.screen[0]-6,p[1])) *def OnEnter (self, event): p = self.GetPosition() s = self.GetClientSize() print self.GetPosition() if p == (self.screen[0]-6,p[1]): self.SetPosition((self.screen[0]-21-s[0],p[1]))* def winShow(self, event): p = self.GetPosition() s = self.GetClientSize() print self.GetPosition() if p == (self.screen[0]-6,p[1]): self.SetPosition((self.screen[0]-21-s[0],p[1])) class MyApp(wx.App): def OnInit(self): self.frame = exFrame(NULL, -1, "HoLin Widgets!") self.htmlctrl = iewin.IEHtmlWindow(self.frame) self.htmlctrl.LoadUrl("http://hwl:11/list.asp") self.SetTopWindow(self.frame) self.frame.Show() return True app = MyApp(0) app.MainLoop() -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060211/f0aeb8dd/attachment.htm
2006年02月12日 星期日 00:00
每人了解吗? On 2/11/06, HoLin <holin.he at gmail.com> wrote: > > 加粗部分*EVT_MOUSE_EVENTS(self, self.OnEnter)好像没用。* > > # -*- coding: utf-8 -*- > import wx > from wxPython.wx import * > import wx.lib.iewin as iewin > class exFrame (wxFrame): > def __init__(self, parent, ID, title): > > wxFrame.__init__(self,parent,ID,title,wxDefaultPosition,wxSize(300,400) > ,style= wx.DEFAULT_FRAME_STYLE | wx.STAY_ON_TOP > ) > self.timer = wxPyTimer(self.winHide) > self.timer.Start(1000) > self.screen = (wxSystemSettings.GetMetric (wxSYS_SCREEN_X), > wxSystemSettings.GetMetric(wxSYS_SCREEN_X)) > self.SetPosition((self.screen[0]-6,100)) > *EVT_MOUSE_EVENTS(self, self.OnEnter)* > > > def winHide(self): > p = self.GetPosition() > s = self.GetClientSize() > #print self.GetPosition() > rightD = self.screen[0] - p[0] - s[0] > if rightD in range(0,20): > self.SetPosition((self.screen[0]-6,p[1])) > *def OnEnter (self, event): > p = self.GetPosition() > s = self.GetClientSize() > print self.GetPosition() > if p == (self.screen[0]-6,p[1]): > self.SetPosition((self.screen [0]-21-s[0],p[1]))* > def winShow(self, event): > p = self.GetPosition() > s = self.GetClientSize() > print self.GetPosition() > if p == (self.screen[0]-6,p[1]): > self.SetPosition ((self.screen[0]-21-s[0],p[1])) > > class MyApp(wx.App): > def OnInit(self): > self.frame = exFrame(NULL, -1, "HoLin Widgets!") > self.htmlctrl = iewin.IEHtmlWindow(self.frame) > self.htmlctrl.LoadUrl("http://hwl:11/list.asp") > > self.SetTopWindow(self.frame) > self.frame.Show() > return True > > app = MyApp(0) > app.MainLoop() > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060212/97e7a695/attachment.htm
2006年02月12日 星期日 17:28
没用的是这里,因为条件不成立 *****if p == (self.screen[0]-6,p[1]): self.SetPosition((self.screen [0]-21-s[0],p[1]))* 在06-2-11,HoLin <holin.he at gmail.com> 写道: > > 每人了解吗? > > On 2/11/06, HoLin <holin.he at gmail.com> wrote: > > > > 加粗部分*EVT_MOUSE_EVENTS(self, self.OnEnter)好像没用。* > > > > # -*- coding: utf-8 -*- > > import wx > > from wxPython.wx import * > > import wx.lib.iewin as iewin > > class exFrame (wxFrame): > > def __init__(self, parent, ID, title): > > > > wxFrame.__init__(self,parent,ID,title,wxDefaultPosition,wxSize(300,400) > > ,style= wx.DEFAULT_FRAME_STYLE | wx.STAY_ON_TOP > > ) > > self.timer = wxPyTimer(self.winHide) > > self.timer.Start(1000) > > self.screen = (wxSystemSettings.GetMetric (wxSYS_SCREEN_X), > > wxSystemSettings.GetMetric(wxSYS_SCREEN_X)) > > self.SetPosition((self.screen[0]-6,100)) > > *EVT_MOUSE_EVENTS(self, self.OnEnter)* > > > > > > def winHide(self): > > p = self.GetPosition() > > s = self.GetClientSize() > > #print self.GetPosition() > > rightD = self.screen[0] - p[0] - s[0] > > if rightD in range(0,20): > > self.SetPosition((self.screen[0]-6,p[1])) > > *def OnEnter (self, event): > > p = self.GetPosition() > > s = self.GetClientSize() > > print self.GetPosition() > > if p == (self.screen[0]-6,p[1]): > > self.SetPosition((self.screen [0]-21-s[0],p[1]))* > > def winShow(self, event): > > p = self.GetPosition() > > s = self.GetClientSize() > > print self.GetPosition() > > if p == (self.screen[0]-6,p[1]): > > self.SetPosition ((self.screen[0]-21-s[0],p[1])) > > > > class MyApp(wx.App): > > def OnInit(self): > > self.frame = exFrame(NULL, -1, "HoLin Widgets!") > > self.htmlctrl = iewin.IEHtmlWindow(self.frame) > > self.htmlctrl.LoadUrl("http://hwl:11/list.asp") > > > > self.SetTopWindow(self.frame) > > self.frame.Show() > > return True > > > > app = MyApp(0) > > app.MainLoop() > > > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060212/8283ac91/attachment.html
2006年02月12日 星期日 17:39
这个条件会成立的。 就是事件没有触发,我那里有两个print语句,根本没有执行。:( On 2/12/06, Yin Desheng <dsyin.cool at gmail.com> wrote: > > 没用的是这里,因为条件不成立 > *****if p == (self.screen[0]-6,p[1]): > self.SetPosition((self.screen [0]-21-s[0],p[1]))* > > > > 在06-2-11,HoLin <holin.he at gmail.com> 写道: > > > > 每人了解吗? > > > > On 2/11/06, HoLin <holin.he at gmail.com> wrote: > > > > > > 加粗部分*EVT_MOUSE_EVENTS(self, self.OnEnter)好像没用。* > > > > > > # -*- coding: utf-8 -*- > > > import wx > > > from wxPython.wx import * > > > import wx.lib.iewin as iewin > > > class exFrame (wxFrame): > > > def __init__(self, parent, ID, title): > > > > > > wxFrame.__init__(self,parent,ID,title,wxDefaultPosition,wxSize(300,400) > > > ,style= wx.DEFAULT_FRAME_STYLE | wx.STAY_ON_TOP > > > ) > > > self.timer = wxPyTimer(self.winHide) > > > self.timer.Start(1000) > > > self.screen = (wxSystemSettings.GetMetric (wxSYS_SCREEN_X), > > > wxSystemSettings.GetMetric(wxSYS_SCREEN_X)) > > > self.SetPosition((self.screen[0]-6,100)) > > > *EVT_MOUSE_EVENTS(self, self.OnEnter)* > > > > > > > > > def winHide(self): > > > p = self.GetPosition() > > > s = self.GetClientSize() > > > #print self.GetPosition() > > > rightD = self.screen[0] - p[0] - s[0] > > > if rightD in range(0,20): > > > self.SetPosition((self.screen[0]-6,p[1])) > > > *def OnEnter (self, event): > > > p = self.GetPosition() > > > s = self.GetClientSize() > > > print self.GetPosition() > > > if p == (self.screen[0]-6,p[1]): > > > self.SetPosition((self.screen [0]-21-s[0],p[1]))* > > > def winShow(self, event): > > > p = self.GetPosition() > > > s = self.GetClientSize() > > > print self.GetPosition() > > > if p == (self.screen[0]-6,p[1]): > > > self.SetPosition ((self.screen[0]-21-s[0],p[1])) > > > > > > class MyApp(wx.App): > > > def OnInit(self): > > > self.frame = exFrame(NULL, -1, "HoLin Widgets!") > > > self.htmlctrl = iewin.IEHtmlWindow(self.frame) > > > self.htmlctrl.LoadUrl("http://hwl:11/list.asp") > > > > > > self.SetTopWindow(self.frame) > > > self.frame.Show() > > > return True > > > > > > app = MyApp(0) > > > app.MainLoop() > > > > > > > > > _______________________________________________ > > python-chinese > > Post: send python-chinese at lists.python.cn > > Subscribe: send subscribe to python-chinese-request at lists.python.cn > > Unsubscribe: send unsubscribe to > > python-chinese-request at lists.python.cn > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20060212/ad9e7422/attachment.htm
Zeuux © 2025
京ICP备05028076号