I have a simple program which has 7 different windows, with buttons down the
left side (similar to many 'real' programs) that change the window on the
right.
At present, I have 7 different panels that I show & hide, and reparent in &
out of a splitter window. Simple and effective, works well.
One of these windows has a grid, which doesn't play well with the panel it
sits on. Robin has advised best just to put it in a sizer.
Before I rewrite everything, I'll ask your advise.
1. Is is possible to do a similar thing (show/hide etc) with a sizer? (In
my mind it won't work, but I haven't tried it yet)
2, What is the 'correct' way to change views (or whatever the correct term
would be)? This simple app is a test of my abilities before I launch into a
very much larger program, so I make as many mistakes as possible before it
becomes important. Its about to become important!
I have a simple program which has 7 different windows, with buttons down the
left side (similar to many 'real' programs) that change the window on the
right.
At present, I have 7 different panels that I show & hide, and reparent in &
out of a splitter window. Simple and effective, works well.
One of these windows has a grid, which doesn't play well with the panel it
sits on. Robin has advised best just to put it in a sizer.
Before I rewrite everything, I'll ask your advise.
1. Is is possible to do a similar thing (show/hide etc) with a sizer? (In
my mind it won't work, but I haven't tried it yet)
It should work. Sizers have Show() and Hide() methods...
2, What is the 'correct' way to change views (or whatever the correct term
would be)? This simple app is a test of my abilities before I launch into a
very much larger program, so I make as many mistakes as possible before it
becomes important. Its about to become important!
I guess it depends. Sounds like a Notebook would be easier, but that
may not be what you want.
Thanks for any and all info on how you do it.
I recently documented all the sizers. Go here:
Look for Sizers.py. That should help with your sizer questions.
···
--
Patrick K. O'Brien
Orbtech http://www.orbtech.com/web/pobrien
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------
This doc is just great, have been searching all over - Chris thanks for asking the question.
BTW, you might want to update include the RowColSizer - see wxPython.lib.rcsizer.py
Thanks again
Werner
Patrick K. O'Brien wrote:
···
"Chris Munchenberg" <cjm@ava.com.au> writes:
I have a simple program which has 7 different windows, with buttons down the
left side (similar to many 'real' programs) that change the window on the
right.
At present, I have 7 different panels that I show & hide, and reparent in &
out of a splitter window. Simple and effective, works well.
One of these windows has a grid, which doesn't play well with the panel it
sits on. Robin has advised best just to put it in a sizer.
Before I rewrite everything, I'll ask your advise.
1. Is is possible to do a similar thing (show/hide etc) with a sizer? (In
my mind it won't work, but I haven't tried it yet)
It should work. Sizers have Show() and Hide() methods...
2, What is the 'correct' way to change views (or whatever the correct term
would be)? This simple app is a test of my abilities before I launch into a
very much larger program, so I make as many mistakes as possible before it
becomes important. Its about to become important!
I guess it depends. Sounds like a Notebook would be easier, but that
may not be what you want.
I occasionally get just the console window open with a message 'Insufficient Memory' when I try to run a wxPython program. Windows ME, wxPy 2.4.0.7, python 2.2.2
This happens frequently on my Mother's much older & memory impaired windows box. windows 98 with so much junk on it I can barely find my way around.
What is the best way to approach fixing this sort of problem (apart from changing OS)?
Does "fixing" mean a more graceful exit, or somehow finding a way to run
with what few resources are available?
Actually I don't the answer to either, but I just wanted to say that I
had so many problems with Windows ME on a daily basis that I *had* to
leave it. I've decided that when I release my wxPython program, I will
not support Windows 95/98/ME or NT. I'm only going to support Windows
2000 (which is working great for me!) and XP[Pro]. Acccording to some
research I did, that covers 60% of Windows users. Of course, that
number will continue to climb.
I've also seen software packages whose sole purpose was to make Windows
95/98/Me run better, although I can't remember the title names.
Best of luck,
···
On Saturday 26 April 2003 07:31 pm, Chris Munchenberg wrote:
I occasionally get just the console window open with a message
'Insufficient Memory' when I try to run a wxPython program. Windows
ME, wxPy 2.4.0.7, python 2.2.2
This happens frequently on my Mother's much older & memory impaired
windows box. windows 98 with so much junk on it I can barely find my
way around.
What is the best way to approach fixing this sort of problem (apart
from changing OS)?
I occasionally get just the console window open with a message 'Insufficient Memory' when I try to run a wxPython program. Windows ME, wxPy 2.4.0.7, python 2.2.2
This happens frequently on my Mother's much older & memory impaired windows box. windows 98 with so much junk on it I can barely find my way around.
What is the best way to approach fixing this sort of problem (apart from changing OS)?
You don't specify anything about your hardware, but I'm guessing these are both fairly old systems with not much physical memory installed, right? There are a few possible solutions to this problem. One is to eliminate many/most of the background tasks running on the computer. (All of those little systray icons represent programs that hold on to their share of memory -- quitting/uninstalling them should free up memory.) Another way is to simply physically install more memory modules. You might possibly be able to get some improvement by fiddling with Windows' virtual memory settings, as well. Unfortunately, this is really a system problem, not a Python problem, and needs to be addressed at that level.
Jeff Shannon
Technician/Programmer
Credit International
If it is really a virtual memory issue, it should
be possible to increase the size of the swap file
I guess. Unless the disk is nearly full. But RAM
is almost for free, right? 128MB DDR is about $15
here. Although if you need old EDO RAMs, it's more
expensive...
Once upon a time, Windows had horrible problems with
GUI resources. It wasn't RAM in general the system ran
out of, but the amount of memory dedicated to GUI
windows and controls. But surely that problem was
solved with Win95? Wasn't it?
···
At 11:08 2003-04-28 -0700, Jeff wrote:
Chris Munchenberg wrote:
I occasionally get just the console window open with a message 'Insufficient Memory' when I try to run a wxPython program. Windows ME, wxPy 2.4.0.7, python 2.2.2
You don't specify anything about your hardware, but I'm guessing these are both fairly old systems with not much physical memory installed, right? There are a few possible solutions to this problem. One is to eliminate many/most of the background tasks running on the computer. (All of those little systray icons represent programs that hold on to their share of memory -- quitting/uninstalling them should free up memory.) Another way is to simply physically install more memory modules. You might possibly be able to get some improvement by fiddling with Windows' virtual memory settings, as well. Unfortunately, this is really a system problem, not a Python problem, and needs to be addressed at that level.
--
Magnus Lycka (It's really Lyckå), magnus@thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The shortest path from thought to working program
Once upon a time, Windows had horrible problems with
GUI resources. It wasn't RAM in general the system ran
out of, but the amount of memory dedicated to GUI
windows and controls. But surely that problem was
solved with Win95? Wasn't it?
No, IIRC the limits for the resource handle tables and such were made larger in win9x, but there are still limits and they are still not large enough in some circumstances. It's not until you get to NT/2k/XP that the OS can make full use of available memory and do better virtual memory managment. For example, if my foggy memory is correct, win98 can only use something like 32 or 64 meg for OS and application run-time memory and does virtual memory swapping for this chunk only, the rest of the RAM can only be used as disk cache.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Well, what can I say. Ugly old QDOS must have been stretched
and expanded far, far beyond Tim Paterson's wildest dreams...
It is after all his old code and Bill's file system from NCR
BASIC that is the foundation of Windows Me...
(See http://voteview.uh.edu/gates.htm )
···
At 10:30 2003-04-30 -0700, you wrote:
No, IIRC the limits for the resource handle tables and such were made larger in win9x, but there are still limits and they are still not large enough in some circumstances. It's not until you get to NT/2k/XP that the OS can make full use of available memory and do better virtual memory managment. For example, if my foggy memory is correct, win98 can only use something like 32 or 64 meg for OS and application run-time memory and does virtual memory swapping for this chunk only, the rest of the RAM can only be used as disk cache.
--
Magnus Lycka (It's really Lyckå), magnus@thinkware.se
Thinkware AB, Sweden, www.thinkware.se
I code Python ~ The shortest path from thought to working program