From: <bra...@om...> - 2005-03-19 17:59:52
|
I've noticed that the basic structure in PythonCard involves every window having a separate menubar. Is there a way in PythonCard to have an overarching application menu, with no menus in each window? Thanks! |
From: Liam C. <cy...@gm...> - 2005-03-19 21:05:13
|
In the Resource Editor, go to Background Info and turn off menus for the windows. On Sat, 19 Mar 2005 11:59:09 -0600, bra...@om... <bra...@om...> wrote: > > I've noticed that the basic structure in PythonCard involves every window > having a separate menubar. Is there a way in PythonCard to have an > overarching application menu, with no menus in each window? > > Thanks! -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. |
From: <bra...@om...> - 2005-03-19 22:29:54
|
Hm...I don't see that option on any of my windows under Background Info. I'm using PythonCard .81 with Python 2.3 under Windows XP . I do see a checkbox called "Status bar on Window", but unchecking that had no effect that I could see. The menus on my primary parent window are still not available in child windows. To clarify, what I'm trying to accomplish here is an overarching application window which contains other windows. At least, that's what it would look like under Windows. On a Mac, it would just be an menubar globally available and applicable independent of which window happened to be active. I'm not clear on how to accomplish this in PythonCard. Thanks! Liam Clarke <cy...@gm...> wrote on 03/19/2005 03:05:09 PM: > In the Resource Editor, go to Background Info and turn off menus for > the windows. > > > On Sat, 19 Mar 2005 11:59:09 -0600, bra...@om... > <bra...@om...> wrote: > > > > I've noticed that the basic structure in PythonCard involves every window > > having a separate menubar. Is there a way in PythonCard to have an > > overarching application menu, with no menus in each window? > > > > Thanks! > > > -- > 'There is only one basic human right, and that is to do as you damn > well please. > And with it comes the only basic human duty, to take the consequences. |
From: Alex T. <al...@tw...> - 2005-03-20 01:49:44
|
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 18/03/2005 |
From: <bra...@om...> - 2005-03-20 02:24:37
|
Hm...my app has a lot of fairly small windows, since it's a database front end with a lot of small forms and lists (not 'documents', per se). It seems a little odd for each one to have an individual menubar containing global navigation features. I guess that pushes me toward the single window tabbed interface approach. The sample demo for tabbed interface (testNotebook) looks good, but I get the impression that the Notebook for PythonCard is still somewhat experimental. Should I expect problems if I start using it? Thanks! Brad Allen wrote: > > Hm...I don't see that option on any of my windows under Background > Info. I'm using PythonCard .81 with Python 2.3 under Windows XP . I > do see a checkbox called "Status bar on Window", but unchecking that > had no effect that I could see. The menus on my primary parent > window are still not available in child windows. > > To clarify, what I'm trying to accomplish here is an overarching > application window which contains other windows. At least, that's > what it would look like under Windows. Alex Tweedly wrote on 03/19/2005 07:49:39 PM: > That's (I think, from your description) the old Windows MDI > (multiple doc interface) style - a single window, with a menu and > one or more "document" windows - such as Adobe Photoshop Elements > (though it adds palettes and floating toolbars and other extras). > Another example would be old versions of Word, Excel, etc. > > That style has been largely deprecated by MS in favour of either > their SDI (Single Doc Interface), such as recent versions of Word, > Excel, etc., where each doc window has its own set of menus (and > there may also be palettes, etc.), or notebook / tabbed styles. > > There's no direct support for MDI in Pythoncard - though I believe > you can achieve it using wxPython directly to create the sub- > windows. For what it's worth, I'd recommend against this - it really > is "last decade's" style :-) > > Personally, I think the notebook/tabbed style is the way to go, with > separate child windows (probably menu-less) for any additional child > windows which are not "document" windows. > > There is something of a "myth" that MDI is "the Windows way to do > it" - resulting from the old version of MS products - but if you > look closely at current products (not just from MS), most of them > have abandoned that style in favour of one of the other styles. > On a Mac, it would just be an menubar globally available and > applicable independent of which window happened to be active. I'm > not clear on how to accomplish this in PythonCard. > Sorry, can't say anything about Mac. > -- > Alex Tweedly http://www.tweedly.net > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 18/03/2005 |
From: Liam C. <cy...@gm...> - 2005-03-20 03:03:13
|
Pythoncard in itself can be a bit experimental. All I can say is unit test, unit test, unit test. That said, Pythoncard is very versatile in unexpected ways, especially with the ability to tweak & fiddle by dropping to the underlying wx methods. Sound like you need a multiframe window, which Pythoncard doesn't do at the mo, AFAIK. Good luck with the MDI. Regards, Liam Clarke On Sat, 19 Mar 2005 20:23:59 -0600, bra...@om... <bra...@om...> wrote: > > Hm...my app has a lot of fairly small windows, since it's a database front > end with a lot of small forms and lists (not 'documents', per se). It seems > a little odd for each one to have an individual menubar containing global > navigation features. I guess that pushes me toward the single window tabbed > interface approach. The sample demo for tabbed interface (testNotebook) > looks good, but I get the impression that the Notebook for PythonCard is > still somewhat experimental. Should I expect problems if I start using it? > > Thanks! > > > > Brad Allen wrote: > > > > Hm...I don't see that option on any of my windows under Background > > Info. I'm using PythonCard .81 with Python 2.3 under Windows XP . I > > do see a checkbox called "Status bar on Window", but unchecking that > > had no effect that I could see. The menus on my primary parent > > window are still not available in child windows. > > > > To clarify, what I'm trying to accomplish here is an overarching > > application window which contains other windows. At least, that's > > what it would look like under Windows. > > Alex Tweedly wrote on 03/19/2005 07:49:39 PM: > > > > That's (I think, from your description) the old Windows MDI > > (multiple doc interface) style - a single window, with a menu and > > one or more "document" windows - such as Adobe Photoshop Elements > > (though it adds palettes and floating toolbars and other extras). > > Another example would be old versions of Word, Excel, etc. > > > > That style has been largely deprecated by MS in favour of either > > their SDI (Single Doc Interface), such as recent versions of Word, > > Excel, etc., where each doc window has its own set of menus (and > > there may also be palettes, etc.), or notebook / tabbed styles. > > > > There's no direct support for MDI in Pythoncard - though I believe > > you can achieve it using wxPython directly to create the sub- > > windows. For what it's worth, I'd recommend against this - it really > > is "last decade's" style :-) > > > > Personally, I think the notebook/tabbed style is the way to go, with > > separate child windows (probably menu-less) for any additional child > > windows which are not "document" windows. > > > > There is something of a "myth" that MDI is "the Windows way to do > > it" - resulting from the old version of MS products - but if you > > look closely at current products (not just from MS), most of them > > have abandoned that style in favour of one of the other styles. > > On a Mac, it would just be an menubar globally available and > > applicable independent of which window happened to be active. I'm > > not clear on how to accomplish this in PythonCard. > > Sorry, can't say anything about Mac. > > -- > > Alex Tweedly http://www.tweedly.net > > No virus found in this outgoing message. > > Checked by AVG Anti-Virus. > > Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 18/03/2005 > -- 'There is only one basic human right, and that is to do as you damn well please. And with it comes the only basic human duty, to take the consequences. |
From: <bra...@om...> - 2005-03-20 03:28:23
|
I'm thinking I can get by with a tabbed interface for the main window, and go with small menu-less child windows for some of the individual forms. For instance, an Employees tab would show a multiColumnList of employees with search filters at the top. To edit an employee record, the user doubleclicks a line and an employee edit window pops up. This seems like a workable approach. I guess I need to take a look at how to implement the Notebook. Liam Clarke <cy...@gm...> wrote on 03/19/2005 09:03:05 PM: > Pythoncard in itself can be a bit experimental. All I can say is unit > test, unit test, unit test. > That said, Pythoncard is very versatile in unexpected ways, especially > with the ability to tweak & fiddle by dropping to the underlying wx > methods. > > Sound like you need a multiframe window, which Pythoncard doesn't do > at the mo, AFAIK. > > Good luck with the MDI. > > Regards, > > Liam Clarke > > On Sat, 19 Mar 2005 20:23:59 -0600, bra...@om... > <bra...@om...> wrote: > > > > Hm...my app has a lot of fairly small windows, since it's a database front > > end with a lot of small forms and lists (not 'documents', per se). It seems > > a little odd for each one to have an individual menubar containing global > > navigation features. I guess that pushes me toward the single window tabbed > > interface approach. The sample demo for tabbed interface (testNotebook) > > looks good, but I get the impression that the Notebook for PythonCard is > > still somewhat experimental. Should I expect problems if I start using it? > > > > Thanks! > > > > > > > > Brad Allen wrote: > > > > > > Hm...I don't see that option on any of my windows under Background > > > Info. I'm using PythonCard .81 with Python 2.3 under Windows XP . I > > > do see a checkbox called "Status bar on Window", but unchecking that > > > had no effect that I could see. The menus on my primary parent > > > window are still not available in child windows. > > > > > > To clarify, what I'm trying to accomplish here is an overarching > > > application window which contains other windows. At least, that's > > > what it would look like under Windows. > > > > Alex Tweedly wrote on 03/19/2005 07:49:39 PM: > > > > > > > That's (I think, from your description) the old Windows MDI > > > (multiple doc interface) style - a single window, with a menu and > > > one or more "document" windows - such as Adobe Photoshop Elements > > > (though it adds palettes and floating toolbars and other extras). > > > Another example would be old versions of Word, Excel, etc. > > > > > > That style has been largely deprecated by MS in favour of either > > > their SDI (Single Doc Interface), such as recent versions of Word, > > > Excel, etc., where each doc window has its own set of menus (and > > > there may also be palettes, etc.), or notebook / tabbed styles. > > > > > > There's no direct support for MDI in Pythoncard - though I believe > > > you can achieve it using wxPython directly to create the sub- > > > windows. For what it's worth, I'd recommend against this - it really > > > is "last decade's" style :-) > > > > > > Personally, I think the notebook/tabbed style is the way to go, with > > > separate child windows (probably menu-less) for any additional child > > > windows which are not "document" windows. > > > > > > There is something of a "myth" that MDI is "the Windows way to do > > > it" - resulting from the old version of MS products - but if you > > > look closely at current products (not just from MS), most of them > > > have abandoned that style in favour of one of the other styles. > > > On a Mac, it would just be an menubar globally available and > > > applicable independent of which window happened to be active. I'm > > > not clear on how to accomplish this in PythonCard. > > > Sorry, can't say anything about Mac. > > > -- > > > Alex Tweedly http://www.tweedly.net > > > No virus found in this outgoing message. > > > Checked by AVG Anti-Virus. > > > Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 18/03/2005 > > > > > -- > 'There is only one basic human right, and that is to do as you damn > well please. > And with it comes the only basic human duty, to take the consequences. |
From: Kevin A. <al...@se...> - 2005-03-21 16:25:36
|
On Mar 19, 2005, at 7:27 PM, bra...@om... wrote: > > I'm thinking I can get by with a tabbed interface for the main window, > and go with small menu-less child windows for some of the individual > forms. For instance, an Employees tab would show a multiColumnList of > employees with search filters at the top. To edit an employee record, > the user doubleclicks a line and an employee edit window pops up. This > seems like a workable approach. I guess I need to take a look at how > to implement the Notebook. > A tabbed interface seems like the way to go. There is currently no option to toggle the menubar for a window on and off in the resourceEditor. The reason I didn't do that is if someone made a bunch of menus and then accidentally got rid of them they would be pretty upset, and we have no undo feature. Instead when you create your background by using New under the File menu, select the appropriate template, for whether you want menus or not. The "main" menubar is always available to all windows. On the main background, it is just self.menuBar so on a child window you would access it as self.getParent().menuBar. When you use a single menubar and child windows, one of the things you have to watch out for is focus. Your main window will get the focus. If you run with the Message Watcher you'll see the deactivate, loseFocus, activate, loseFocus, gainFocus messages fire. Depending on what you want to do, you'll probably need to use the findFocus() method or some other method of tracking what is going on in your child window and saving that information in an on_deactivate method which you would then access in your main window menu item event handler. ka |
From: Kevin A. <al...@se...> - 2005-03-21 16:54:45
|
Also the menubar portion of the .rsrc.py file can be manually added and deleted outside of the resourceEditor program if needed. Just edit the file with your favorite Python editor if some manual tweaking is required that the resourceEditor doesn't support, just make a backup before you start ;-) ka |
From: <bra...@om...> - 2005-03-21 17:19:41
|
I'm now leaning toward letting child windows each have their own copy of the menu bar; apparently this is standard on Windows and I should get over my Mac-centric feeling that it's "weird" for small child windows to have menubars. "Kevin Altis" <al...@se...> wrote on 03/21/2005 10:25:35 AM: > On Mar 19, 2005, at 7:27 PM, bra...@om... wrote: > > > > > I'm thinking I can get by with a tabbed interface for the main window, > > and go with small menu-less child windows for some of the individual > > forms. For instance, an Employees tab would show a multiColumnList of > > employees with search filters at the top. To edit an employee record, > > the user doubleclicks a line and an employee edit window pops up. This > > seems like a workable approach. I guess I need to take a look at how > > to implement the Notebook. > > > > A tabbed interface seems like the way to go. There is currently no > option to toggle the menubar for a window on and off in the > resourceEditor. The reason I didn't do that is if someone made a bunch > of menus and then accidentally got rid of them they would be pretty > upset, and we have no undo feature. Instead when you create your > background by using New under the File menu, select the appropriate > template, for whether you want menus or not. > > The "main" menubar is always available to all windows. On the main > background, it is just self.menuBar so on a child window you would > access it as self.getParent().menuBar. > > When you use a single menubar and child windows, one of the things you > have to watch out for is focus. Your main window will get the focus. If > you run with the Message Watcher you'll see the deactivate, loseFocus, > activate, loseFocus, gainFocus messages fire. Depending on what you > want to do, you'll probably need to use the findFocus() method or some > other method of tracking what is going on in your child window and > saving that information in an on_deactivate method which you would then > access in your main window menu item event handler. > > ka |
From: <bra...@om...> - 2005-03-28 22:22:48
|
So, I've now got a main window with a tabbed interface and a global menubar that works for all the tabs. However, I still need to spawn a few child windows, and these need to have a copy of the main menubar. I have tried binding the menubar of the parent during the background initialization of the child window, like so: class MyBackground( model.Background): def on_initialize(self, event): self.menuBar = self.getParent().menuBar This doesn't work, although it doesn't seem to generate any exceptions that I can see. I have tried it on child windows whose resource file contains no menubar, and I have tried it on child windows whose resource file contains no menubar. Is there a method for refreshing the menubar? Thanks! "Kevin Altis" <al...@se...> wrote on 03/21/2005 10:25:35 AM: > On Mar 19, 2005, at 7:27 PM, bra...@om... wrote: > > > > > I'm thinking I can get by with a tabbed interface for the main window, > > and go with small menu-less child windows for some of the individual > > forms. For instance, an Employees tab would show a multiColumnList of > > employees with search filters at the top. To edit an employee record, > > the user doubleclicks a line and an employee edit window pops up. This > > seems like a workable approach. I guess I need to take a look at how > > to implement the Notebook. > > > > A tabbed interface seems like the way to go. There is currently no > option to toggle the menubar for a window on and off in the > resourceEditor. The reason I didn't do that is if someone made a bunch > of menus and then accidentally got rid of them they would be pretty > upset, and we have no undo feature. Instead when you create your > background by using New under the File menu, select the appropriate > template, for whether you want menus or not. > > The "main" menubar is always available to all windows. On the main > background, it is just self.menuBar so on a child window you would > access it as self.getParent().menuBar. > > When you use a single menubar and child windows, one of the things you > have to watch out for is focus. Your main window will get the focus. If > you run with the Message Watcher you'll see the deactivate, loseFocus, > activate, loseFocus, gainFocus messages fire. Depending on what you > want to do, you'll probably need to use the findFocus() method or some > other method of tracking what is going on in your child window and > saving that information in an on_deactivate method which you would then > access in your main window menu item event handler. > > ka |
From: <bra...@om...> - 2005-03-28 22:32:34
|
Whoops, I must be blind. Apparently PageBackground objects have no attribute getParent(). pyt...@li... wrote on 03/28/2005 04:21:51 PM: > > So, I've now got a main window with a tabbed interface and a global menubar > that works for all the tabs. However, I still need to spawn a few > child windows, and these > need to have a copy of the main menubar. I have tried binding the > menubar of the > parent during the background initialization of the child window, like so: > > class MyBackground( model.Background): > def on_initialize(self, event): > self.menuBar = self.getParent().menuBar > > This doesn't work, although it doesn't seem to generate any > exceptions that I can see. > I have tried it on child windows whose resource file contains no > menubar, and I have tried > it on child windows whose resource file contains no menubar. > > Is there a method for refreshing the menubar? > > Thanks! > > "Kevin Altis" <al...@se...> wrote on 03/21/2005 10:25:35 AM: > > > On Mar 19, 2005, at 7:27 PM, bra...@om... wrote: > > > > > > > > I'm thinking I can get by with a tabbed interface for the main window, > > > and go with small menu-less child windows for some of the individual > > > forms. For instance, an Employees tab would show a multiColumnList of > > > employees with search filters at the top. To edit an employee record, > > > the user doubleclicks a line and an employee edit window pops up. This > > > seems like a workable approach. I guess I need to take a look at how > > > to implement the Notebook. > > > > > > > A tabbed interface seems like the way to go. There is currently no > > option to toggle the menubar for a window on and off in the > > resourceEditor. The reason I didn't do that is if someone made a bunch > > of menus and then accidentally got rid of them they would be pretty > > upset, and we have no undo feature. Instead when you create your > > background by using New under the File menu, select the appropriate > > template, for whether you want menus or not. > > > > The "main" menubar is always available to all windows. On the main > > background, it is just self.menuBar so on a child window you would > > access it as self.getParent().menuBar. > > > > When you use a single menubar and child windows, one of the things you > > have to watch out for is focus. Your main window will get the focus. If > > you run with the Message Watcher you'll see the deactivate, loseFocus, > > activate, loseFocus, gainFocus messages fire. Depending on what you > > want to do, you'll probably need to use the findFocus() method or some > > other method of tracking what is going on in your child window and > > saving that information in an on_deactivate method which you would then > > access in your main window menu item event handler. > > > > ka |