From: Stoons <st...@he...> - 2005-07-27 20:29:36
|
Hi there. I was just wondering if there is any possibility to make a window with = toolbox-look (you know: a a narrow titlebar with only a = close-button)...? If, so how...? /Stoons : PythonCard Lover...! =3D ) |
From: <bri...@sy...> - 2005-07-27 20:58:15
|
In the past I've hacked the styles for wx.Frame init in the file model.py but that is kind of ugly If you want to try, it has worked for many of the windows styles listed in the wxWidgets help for class wxFrame. I haven't done it for recent wxWidgets/PythonCard versions. pyt...@li... wrote on 07/27/2005 01:29:18 PM: > Hi there. > > I was just wondering if there is any possibility to make a window > with toolbox-look (you know: a a narrow titlebar with only a close-button)...? > If, so how...? > > /Stoons : PythonCard Lover...! = ) > |
From: Phil E. <ph...@li...> - 2005-07-29 08:42:37
|
On Wed, 2005-07-27 at 13:58 -0700, bri...@sy... wrote: > In the past I've hacked the styles for wx.Frame init in the file model.py > but that is kind of ugly > If you want to try, it has worked for many of the windows styles listed in > the wxWidgets help > for class wxFrame. > > I haven't done it for recent wxWidgets/PythonCard versions. > > pyt...@li... wrote on 07/27/2005 01:29:18 > PM: > > > Hi there. > > > > I was just wondering if there is any possibility to make a window > > with toolbox-look (you know: a a narrow titlebar with only a > close-button)...? > > If, so how...? > > I have just such a window in an appplication of mine. Put this code in your PythonCard application: -----begin code----- class MyMiniFrame(wx.MiniFrame): def __init__( self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE ): wx.MiniFrame.__init__(self, parent, -1, title, pos, size, style) panel = wx.Panel(self, -1) txt = wx.StaticText(self, -1, "Scanning, please wait...") txt.SetPosition((20,10)) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) def OnCloseWindow(self, event): self.Destroy() ------end code------ Then to make the window appear, the code I have is this: -----begin code----- def on_scanBtn_mouseClick(self, event): win = MyMiniFrame(self, "Wireless Network Scan", style=wx.DEFAULT_FRAME_STYLE | wx.TINY_CAPTION_HORIZ) win.SetSize((200, 60)) win.CenterOnParent(wx.BOTH) win.Show(True) win.Update() win.Refresh() wx.Yield() cmd = '/sbin/iwlist %s scan' % self.iface result = commands.getoutput(cmd) win.Close() ------end code------ Hope this helps. |
From: Stoons <st...@he...> - 2005-08-01 07:14:12
|
Hi there... I found a solution, I inserted the follwing: def on_initialize(self,event): .... .... self.SetWindowStyle(wx.CAPTION | wx.CLOSE_BOX | wx.STAY_ON_TOP | wx.FRAME_TOOL_WINDOW | wx.CLOSE_BOX | wx.SYSTEM_MENU ) self.Refresh() /Stoons. PS Pythoncard truly rules..! ----- Original Message ----- From: "Phil Edwards" <ph...@li...> To: "Pythoncard-Users" <pyt...@li...> Sent: Friday, July 29, 2005 10:42 AM Subject: Re: [Pythoncard-users] Is "Toolbox" background possible to make...? > On Wed, 2005-07-27 at 13:58 -0700, bri...@sy... wrote: >> In the past I've hacked the styles for wx.Frame init in the file model.py >> but that is kind of ugly >> If you want to try, it has worked for many of the windows styles listed >> in >> the wxWidgets help >> for class wxFrame. >> >> I haven't done it for recent wxWidgets/PythonCard versions. >> >> pyt...@li... wrote on 07/27/2005 01:29:18 >> PM: >> >> > Hi there. >> > >> > I was just wondering if there is any possibility to make a window >> > with toolbox-look (you know: a a narrow titlebar with only a >> close-button)...? >> > If, so how...? >> > > > I have just such a window in an appplication of mine. Put this code in > your PythonCard application: > > -----begin code----- > class MyMiniFrame(wx.MiniFrame): > > def __init__( > self, parent, title, pos=wx.DefaultPosition, size=wx.DefaultSize, > style=wx.DEFAULT_FRAME_STYLE > ): > > wx.MiniFrame.__init__(self, parent, -1, title, pos, size, style) > panel = wx.Panel(self, -1) > txt = wx.StaticText(self, -1, "Scanning, please wait...") > txt.SetPosition((20,10)) > > self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) > > def OnCloseWindow(self, event): > self.Destroy() > ------end code------ > > Then to make the window appear, the code I have is this: > > -----begin code----- > def on_scanBtn_mouseClick(self, event): > win = MyMiniFrame(self, "Wireless Network Scan", > style=wx.DEFAULT_FRAME_STYLE | > wx.TINY_CAPTION_HORIZ) > win.SetSize((200, 60)) > win.CenterOnParent(wx.BOTH) > win.Show(True) > win.Update() > win.Refresh() > wx.Yield() > > cmd = '/sbin/iwlist %s scan' % self.iface > result = commands.getoutput(cmd) > win.Close() > ------end code------ > > Hope this helps. > > > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September > 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > |