Hi,
I'm developing a simple application (Linux, wxPython-src-2.8.6.1, Python
2.4.4), which consists of a Frame and a dialog. In the dialog, data is
entered, which changes a static text field in the frame. Therefore, the frame
has to be resized. I do this as follows ("self" is my frame):
size = self.panel.GetBestSize()
# Jetzt Hauptfenster anpassen
self.panel.SetClientSize(size)
self.SetClientSize(size)
The size is correctly calculated and I can see that the window is resized
(e.g. made bigger), but most of the time (appr. in 80% of all cases) the
window is resized back to the previous size. This happens very fast, I can
only see a glimpse of the bigger window.
I tried it also with Fit(), with the same results:
self.panel.Fit()
self.Fit()
This problem is on Linux only, on Windows resizing works always.
Is there some workaround for this?
Best Regards,
Hermann
···
--
x1@aon.at
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7
If you call Layout() on the panel, and then Fit() on the frame, does
that solve your problem? If not, can you please create a minimal,
runnable sample that demonstrates the problem?
···
On Nov 26, 2007 5:27 AM, Hermann Himmelbauer <dusty@qwer.tk> wrote:
Hi,
I'm developing a simple application (Linux, wxPython-src-2.8.6.1, Python
2.4.4), which consists of a Frame and a dialog. In the dialog, data is
entered, which changes a static text field in the frame. Therefore, the frame
has to be resized. I do this as follows ("self" is my frame):
size = self.panel.GetBestSize()
# Jetzt Hauptfenster anpassen
self.panel.SetClientSize(size)
self.SetClientSize(size)
The size is correctly calculated and I can see that the window is resized
(e.g. made bigger), but most of the time (appr. in 80% of all cases) the
window is resized back to the previous size. This happens very fast, I can
only see a glimpse of the bigger window.
I tried it also with Fit(), with the same results:
self.panel.Fit()
self.Fit()
This problem is on Linux only, on Windows resizing works always.
Is there some workaround for this?
Best Regards,
Hermann