From: <kub...@gm...> - 2007-01-31 15:06:45
|
I'm new to using python and pythoncard. I've developed a few simple apps and pythoncard gui's by adapting or modifying existing examples. One simple example I don't see thought is a way to switch between windows. I would like to have a main window with a button to go to a second window. Then a button on the second window to go back to the main window. Does anyone have an example or an explanation of how I can accomplish this? Thanks |
From: Alex T. <al...@tw...> - 2007-02-01 23:20:26
|
kub...@gm... wrote: > I'm new to using python and pythoncard. I've developed a few simple > apps and pythoncard gui's by adapting or modifying existing examples. > One simple example I don't see thought is a way to switch between > windows. I would like to have a main window with a button to go to a > second window. Then a button on the second window to go back to the > main window. Does anyone have an example or an explanation of how I > can accomplish this? > Can you be slightly more specific .... (or alternatively give an example from a well-known application) You start with a single (main) window, and then click on a button. A new (second window appears and is usable. but ... what happens to the main window ? Does it - disappear - remain visible, but inactive - remain active ? Or is the second window simply new content that "replaces" the original main window ? When the second window is active, and you click on the button to "go back to the main window", what should happen to the second window (disappear, remain but inactive, remain active). If the main window remains visible but inactive you can build your second window as a custom dialog (should be examples of this in the samples). If the main window disappears, you could build it (the second window) as a child window, and simply Hide() the main window as needed (similar to what happens in, I think, the Life example, but doing it with the main window rather than Child windows. Unfortunately, I am in the middle of a (painful) switch from PC to Mac, so I don't currently have a working wxPython / PythonCard installation - so I can't check the samples to give more specific pointers. -- Alex Tweedly mailto:al...@tw... www.tweedly.net |
From: <kub...@gm...> - 2007-02-06 17:30:56
|
I would like for the main window to disappear when the second window pops up and the second window disappear when I go back to the first. In other words, I want to toggle between them. I'm working on a math game and would like to be able to select an Addition/Subtraction game with a button (and then return to the main window when through) or have a second button on the main window to select an Addition/Subtraction/Multiplication/Division game when the child is ready for more advanced mathematics. Again with a button to return to the main window On 2/1/07, Alex Tweedly <al...@tw...> wrote: > > kub...@gm... wrote: > > I'm new to using python and pythoncard. I've developed a few simple apps > and pythoncard gui's by adapting or modifying existing examples. One simple > example I don't see thought is a way to switch between windows. I would > like to have a main window with a button to go to a second window. Then a > button on the second window to go back to the main window. Does anyone have > an example or an explanation of how I can accomplish this? > > Can you be slightly more specific .... (or alternatively give an example > from a well-known application) > > You start with a single (main) window, and then click on a button. > A new (second window appears and is usable. > but ... what happens to the main window ? > > Does it > - disappear > - remain visible, but inactive > - remain active ? > Or is the second window simply new content that "replaces" the original > main window ? > > When the second window is active, and you click on the button to "go back > to the main window", what should happen to the second window (disappear, > remain but inactive, remain active). > > If the main window remains visible but inactive you can build your second > window as a custom dialog (should be examples of this in the samples). > If the main window disappears, you could build it (the second window) as a > child window, and simply Hide() the main window as needed (similar to what > happens in, I think, the Life example, but doing it with the main window > rather than Child windows. > > Unfortunately, I am in the middle of a (painful) switch from PC to Mac, so > I don't currently have a working wxPython / PythonCard installation - so I > can't check the samples to give more specific pointers. > > > -- > > Alex Tweedly mailto:al...@tw... <al...@tw...> > www.tweedly.net > |
From: <kub...@gm...> - 2007-02-06 17:42:17
|
On 2/2/07, kub...@gm... <kub...@gm...> wrote: > > I've attached 2 sample windows if you could advise how to toggle between > them. > > On 2/1/07, kub...@gm... <kub...@gm...> wrote: > > > > I would like for the main window to disappear when the second window > > pops up and the second window disappear when I go back to the first. In > > other words, I want to toggle between them. > > > > I'm working on a math game and would like to be able to select an > > Addition/Subtraction game with a button (and then return to the main window > > when through) or have a second button on the main window to select an > > Addition/Subtraction/Multiplication/Division game when the child is ready > > for more advanced mathematics. Again with a button to return to the main > > window. > > > > > > On 2/1/07, Alex Tweedly < al...@tw...> wrote: > > > > > > kub...@gm... wrote: > > > > > > I'm new to using python and pythoncard. I've developed a few simple > > > apps and pythoncard gui's by adapting or modifying existing examples. One > > > simple example I don't see thought is a way to switch between windows. I > > > would like to have a main window with a button to go to a second window. > > > Then a button on the second window to go back to the main window. Does > > > anyone have an example or an explanation of how I can accomplish this? > > > > > > Can you be slightly more specific .... (or alternatively give an > > > example from a well-known application) > > > > > > You start with a single (main) window, and then click on a button. > > > A new (second window appears and is usable. > > > but ... what happens to the main window ? > > > > > > Does it > > > - disappear > > > - remain visible, but inactive > > > - remain active ? > > > Or is the second window simply new content that "replaces" the > > > original main window ? > > > > > > When the second window is active, and you click on the button to "go > > > back to the main window", what should happen to the second window > > > (disappear, remain but inactive, remain active). > > > > > > If the main window remains visible but inactive you can build your > > > second window as a custom dialog (should be examples of this in the > > > samples). > > > If the main window disappears, you could build it (the second window) > > > as a child window, and simply Hide() the main window as needed (similar to > > > what happens in, I think, the Life example, but doing it with the main > > > window rather than Child windows. > > > > > > Unfortunately, I am in the middle of a (painful) switch from PC to > > > Mac, so I don't currently have a working wxPython / PythonCard installation > > > - so I can't check the samples to give more specific pointers. > > > > > > > > > -- > > > > > > Alex Tweedly mailto:al...@tw... <al...@tw...> > > > www.tweedly.net > > > > > > > > > |