From greg.ewing at canterbury.ac.nz Sat Mar 19 06:31:03 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Sat, 19 Mar 2011 18:31:03 +1300 Subject: [Pygui] ANN: PyGUI 2.4 Message-ID: <4D843F97.1010008@canterbury.ac.nz> PyGUI 2.4 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Highlights of this release: * Python 3 Compatible on MacOSX and Windows. * ScrollableView has been overhauled on Windows and should now work with all builds of pywin32 as far as I know. What is PyGUI? -------------- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. -- Gregory Ewing greg.ewing at canterbury.ac.nz http://www.cosc.canterbury.ac.nz/greg.ewing/ From jjmmma at gmail.com Sat Mar 19 15:01:17 2011 From: jjmmma at gmail.com (=?UTF-8?B?6aas5ZCJ6LuN?=) Date: Sat, 19 Mar 2011 22:01:17 +0800 Subject: [Pygui] [pygtk] ANN: PyGUI 2.4 In-Reply-To: <4D843F97.1010008@canterbury.ac.nz> References: <4D843F97.1010008@canterbury.ac.nz> Message-ID: excellent work. that's what i'm seeking for. BRs, Kimi ???? On Sat, Mar 19, 2011 at 1:31 PM, Greg Ewing wrote: > PyGUI 2.4 is available: > > http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ > > Highlights of this release: > > * Python 3 Compatible on MacOSX and Windows. > > * ScrollableView has been overhauled on Windows and should now > work with all builds of pywin32 as far as I know. > > > What is PyGUI? > -------------- > > PyGUI is a cross-platform GUI toolkit designed to be lightweight > and have a highly Pythonic API. > > -- > Gregory Ewing > greg.ewing at canterbury.ac.nz > http://www.cosc.canterbury.ac.nz/greg.ewing/ > _______________________________________________ > pygtk mailing list pygtk at daa.com.au > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://faq.pygtk.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rsyring at inteli-com.com Fri Mar 25 14:29:42 2011 From: rsyring at inteli-com.com (Randy Syring) Date: Fri, 25 Mar 2011 09:29:42 -0400 Subject: [Pygui] Which objects to use for layout? Message-ID: <4D8C98C6.4000502@inteli-com.com> I am just starting into PyGUI and desktop programming, I normally work with python web applications. I am trying to figure out how to layout the application and what objects to use. Basically, I need a window with a "strip" on top for some buttons and other controls, a "content area", and then a footer "strip" with more controls. The content area will have three columns and an indeterminate number of rows, each row having a label, two text boxes, with a button in between the text boxes. The content area will also need to refresh every time I load a new data object so that the text fields are updated with the object's data. I know how to add the Labels, TextFields, Buttons etc. But I am not sure what containers to use for my header/footer and content areas. Can someone give me an idea of how best to layout something like this? Thanks. -- -------------------------------------- Randy Syring Intelicom Direct: 502-276-0459 Office: 502-212-9913 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord (Rom 6:23) From mark.melvin at gmail.com Fri Mar 25 19:14:11 2011 From: mark.melvin at gmail.com (Mark Melvin) Date: Fri, 25 Mar 2011 14:14:11 -0400 Subject: [Pygui] Window Always Starts Behind Others Message-ID: Hi All, I have noticed when I run the samples and my own app, that the PyGUI application window always comes up behind other Windows apps that are running. Is there any way to make it come up on top so the user knows it is running? Thanks, Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rsyring at inteli-com.com Fri Mar 25 19:26:18 2011 From: rsyring at inteli-com.com (Randy Syring) Date: Fri, 25 Mar 2011 14:26:18 -0400 Subject: [Pygui] Window Always Starts Behind Others In-Reply-To: References: Message-ID: <4D8CDE4A.9080001@inteli-com.com> Well, this is only marginally helpful, but that is not the behavior I see for my app. I'm running Ubuntu 10.04, latest PyGUI, and the distributions PyGTK. -------------------------------------- Randy Syring Intelicom Direct: 502-276-0459 Office: 502-212-9913 For the wages of sin is death, but the free gift of God is eternal life in Christ Jesus our Lord (Rom 6:23) On 03/25/2011 02:14 PM, Mark Melvin wrote: > Hi All, > > I have noticed when I run the samples and my own app, that the PyGUI > application window always comes up behind other Windows apps that are > running. Is there any way to make it come up on top so the user knows > it is running? > > Thanks, > Mark. > > > _______________________________________________ > Pygui mailing list > Pygui at python.org > http://mail.python.org/mailman/listinfo/pygui -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.melvin at gmail.com Fri Mar 25 19:29:54 2011 From: mark.melvin at gmail.com (Mark Melvin) Date: Fri, 25 Mar 2011 14:29:54 -0400 Subject: [Pygui] Window Always Starts Behind Others In-Reply-To: <4D8CDE4A.9080001@inteli-com.com> References: <4D8CDE4A.9080001@inteli-com.com> Message-ID: Right - I should have specified my OS. I'm on Windows XP - 32-bit using the latest PyGUI. Thanks for the feedback. Mark. On Fri, Mar 25, 2011 at 2:26 PM, Randy Syring wrote: > Well, this is only marginally helpful, but that is not the behavior I see > for my app. I'm running Ubuntu 10.04, latest PyGUI, and the distributions > PyGTK. > > -------------------------------------- > Randy Syring > Intelicom > Direct: 502-276-0459 > Office: 502-212-9913 > > For the wages of sin is death, but the > free gift of God is eternal life in > Christ Jesus our Lord (Rom 6:23) > > > On 03/25/2011 02:14 PM, Mark Melvin wrote: > > Hi All, > > I have noticed when I run the samples and my own app, that the PyGUI > application window always comes up behind other Windows apps that are > running. Is there any way to make it come up on top so the user knows it is > running? > > Thanks, > Mark. > > > _______________________________________________ > Pygui mailing listPygui at python.orghttp://mail.python.org/mailman/listinfo/pygui > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.melvin at gmail.com Fri Mar 25 21:57:54 2011 From: mark.melvin at gmail.com (Mark Melvin) Date: Fri, 25 Mar 2011 16:57:54 -0400 Subject: [Pygui] Force Refresh? Message-ID: Hi There, Another question. I am using a Label as a type of status text. I am finding that if it call set_text("String") on it, then do some other stuff right away, the text is not updated until later. Is there any way to force the window to refresh the label text before I go on to my next bit of processing? I am on Windows XP with the latest PyGUI. Thanks, Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.ewing at canterbury.ac.nz Sat Mar 26 01:25:34 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Sat, 26 Mar 2011 13:25:34 +1300 Subject: [Pygui] Force Refresh? In-Reply-To: References: Message-ID: <4D8D327E.2060002@canterbury.ac.nz> Mark Melvin wrote: > I am using a Label as a type of status text. I am > finding that if it call set_text("String") on it, then do some other > stuff right away, the text is not updated until later. How much later? It should get updated before the user gets a chance to do anything else. There's an update() method, but it's currently not available on all widgets. I'll see about making it more general. -- Greg From greg.ewing at canterbury.ac.nz Sat Mar 26 01:28:13 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Sat, 26 Mar 2011 13:28:13 +1300 Subject: [Pygui] Window Always Starts Behind Others In-Reply-To: References: <4D8CDE4A.9080001@inteli-com.com> Message-ID: <4D8D331D.4080103@canterbury.ac.nz> Mark Melvin wrote: > I'm on Windows XP - 32-bit using the latest PyGUI. How are you launching the app? If you're not doing so already, try running it with pythonw.exe rather than python.exe, or give it a .pyw extension and double click. -- Greg From greg.ewing at canterbury.ac.nz Sat Mar 26 01:54:01 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Sat, 26 Mar 2011 13:54:01 +1300 Subject: [Pygui] Which objects to use for layout? In-Reply-To: <4D8C98C6.4000502@inteli-com.com> References: <4D8C98C6.4000502@inteli-com.com> Message-ID: <4D8D3929.2060104@canterbury.ac.nz> Randy Syring wrote: > I need a window > with a "strip" on top for some buttons and other controls, a "content > area", and then a footer "strip" with more controls. The content area > will have three columns and an indeterminate number of rows, each row > having a label, two text boxes, with a button in between the text > boxes. The content area will also need to refresh every time I load a > new data object so that the text fields are updated with the object's data. I would suggest using a Row for the header strip, a Grid for the content area, and another Row for the footer strip. If the number of rows in the content area is known when the window is created, you could use a Column to tie the header, content area and footer together. However, it sounds like you want the number of rows to vary dynamically, something that isn't supported very well by PyGUI's container objects at the moment. In that case, you may be better off adding the three areas directly to the Window and positioning them manually. Then when the number of rows changes, you can discard the old content area, create a new one and recalculate the layout. Something like (making this a method of your Window): def replace_content(self, new_content): self.remove(self.content) self.place(new_content, top = self.header) self.content = new_content self.place(self.footer, top = new_content) self.shrink_wrap() -- Greg From mark.melvin at gmail.com Mon Mar 28 16:17:10 2011 From: mark.melvin at gmail.com (Mark Melvin) Date: Mon, 28 Mar 2011 10:17:10 -0400 Subject: [Pygui] Window Always Starts Behind Others In-Reply-To: <4D8D331D.4080103@canterbury.ac.nz> References: <4D8CDE4A.9080001@inteli-com.com> <4D8D331D.4080103@canterbury.ac.nz> Message-ID: On Fri, Mar 25, 2011 at 8:28 PM, Greg Ewing wrote: > Mark Melvin wrote: > >> I'm on Windows XP - 32-bit using the latest PyGUI. >> > > How are you launching the app? > > If you're not doing so already, try running it with pythonw.exe > rather than python.exe, or give it a .pyw extension and double > click. > > -- > Greg > > Hi Greg, I was indeed launching as a console app, and I even had "console" in my py2exe setup. I've changed to using the 'windows' version of the launcher and it seems to have fixed the issue of the GUI launching behind almost every other window and being hidden from view entirely. However, it still pops up behind the console window I launch it from, and the py2exe'd executable version of the application pops up behind the Windows Explorer window from which I launched it. I checked a py2exe'd app I wrote that uses wxPython, and it always pops up on top when launched. Could there be a small issue on Windows with this in PyGUI? Regards, Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.melvin at gmail.com Mon Mar 28 16:40:39 2011 From: mark.melvin at gmail.com (Mark Melvin) Date: Mon, 28 Mar 2011 10:40:39 -0400 Subject: [Pygui] Force Refresh? In-Reply-To: <4D8D327E.2060002@canterbury.ac.nz> References: <4D8D327E.2060002@canterbury.ac.nz> Message-ID: On Fri, Mar 25, 2011 at 8:25 PM, Greg Ewing wrote: > Mark Melvin wrote: > >> I am using a Label as a type of status text. I am finding that if it call >> set_text("String") on it, then do some other stuff right away, the text is >> not updated until later. >> > > How much later? It should get updated before the user gets > a chance to do anything else. > > There's an update() method, but it's currently not available > on all widgets. I'll see about making it more general. > > I am setting the label text, doing some communication over a USB port (which can take a couple seconds), then setting the text to something else. I never see the first label change. Inserting time.sleep(x) does nothing, but I am assuming this is a threading thing. It may work if I do my USB stuff in a background thread, but that is major change and I don't really want to get into threading for this. I have a Label "placed" inside my main Window, and I don't see any update methods available on either of these. :( Thanks, Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.melvin at gmail.com Mon Mar 28 17:02:02 2011 From: mark.melvin at gmail.com (Mark Melvin) Date: Mon, 28 Mar 2011 11:02:02 -0400 Subject: [Pygui] Force Refresh? In-Reply-To: References: <4D8D327E.2060002@canterbury.ac.nz> Message-ID: On Mon, Mar 28, 2011 at 10:40 AM, Mark Melvin wrote: > On Fri, Mar 25, 2011 at 8:25 PM, Greg Ewing wrote: > >> Mark Melvin wrote: >> >>> I am using a Label as a type of status text. I am finding that if it >>> call set_text("String") on it, then do some other stuff right away, the text >>> is not updated until later. >>> >> >> How much later? It should get updated before the user gets >> a chance to do anything else. >> >> There's an update() method, but it's currently not available >> on all widgets. I'll see about making it more general. >> >> > I am setting the label text, doing some communication over a USB port > (which can take a couple seconds), then setting the text to something else. > I never see the first label change. Inserting time.sleep(x) does nothing, > but I am assuming this is a threading thing. It may work if I do my USB > stuff in a background thread, but that is major change and I don't really > want to get into threading for this. I have a Label "placed" inside my main > Window, and I don't see any update methods available on either of these. :( > > Thanks, > Mark. > I found a hack on Windows. If I call myWindow._win.UpdateWindow(), it refreshes immediately. Mark. -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg.ewing at canterbury.ac.nz Mon Mar 28 23:03:54 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Tue, 29 Mar 2011 10:03:54 +1300 Subject: [Pygui] Window Always Starts Behind Others In-Reply-To: References: <4D8CDE4A.9080001@inteli-com.com> <4D8D331D.4080103@canterbury.ac.nz> Message-ID: <4D90F7BA.5010005@canterbury.ac.nz> Mark Melvin wrote: > I was indeed launching as a console app, and I even had "console" in my > py2exe setup. I've changed to using the 'windows' version of the > launcher and it seems to have fixed the issue of the GUI launching > behind almost every other window and being hidden from view entirely. > However, it still pops up behind the console window I launch it from, > and the py2exe'd executable version of the application pops up behind > the Windows Explorer window from which I launched it. > > I checked a py2exe'd app I wrote that uses wxPython, and it always pops > up on top when launched. Could there be a small issue on Windows with > this in PyGUI? It's very possible, but I'm not enough of a Windows guru to know what to do about it. I'll send this to the python-win32 list to see if anyone there has any ideas. -- Greg From greg.ewing at canterbury.ac.nz Mon Mar 28 23:16:43 2011 From: greg.ewing at canterbury.ac.nz (Greg Ewing) Date: Tue, 29 Mar 2011 10:16:43 +1300 Subject: [Pygui] Force Refresh? In-Reply-To: References: <4D8D327E.2060002@canterbury.ac.nz> Message-ID: <4D90FABB.30406@canterbury.ac.nz> Mark Melvin wrote: > I am setting the label text, doing some communication over a USB port > (which can take a couple seconds), then setting the text to something > else. I never see the first label change. If you're waiting synchronously -- without returning to the main event loop -- then this is quite likely to happen. > I have a Label > "placed" inside my main Window, and I don't see any update methods > available on either of these. :( Yep, I need to move the update method higher up the inheritance hierarchy, or at least make it available on Window. -- Greg