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 |