For me ...
Python 3.6.6
python3-wxgtk4.0:
Installed: 4.0.1+dfsg-6
Candidate: 4.0.1+dfsg-6
Version table:
*** 4.0.1+dfsg-6 990
990 http://httpredir.debian.org/debian buster/main i386 Packages
500 http://httpredir.debian.org/debian unstable/main i386 Packages
100 /var/lib/dpkg/status
... the attached code shows an app with one empty frame, as
expected. But the size is 400x250.
Why ?
(I would have expected it to be 640x440.)
Thanks for any pointers,
Karsten
xtest-frame-only.py (218 Bytes)
···
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
For me ...
Python 3.6.6
python3-wxgtk4.0:
Installed: 4.0.1+dfsg-6
Candidate: 4.0.1+dfsg-6
Version table:
*** 4.0.1+dfsg-6 990
990 Index of /debian buster/main i386 Packages
500 Index of /debian unstable/main i386 Packages
100 /var/lib/dpkg/status
... the attached code shows an app with one empty frame, as
expected. But the size is 400x250.
Why ?
(I would have expected it to be 640x440.)
That one I *did* test BTW
Karsten
···
On Mon, Aug 13, 2018 at 10:10:57AM +0200, Karsten Hilbert wrote:
import wx
class cTestApp(wx.App):
def OnInit(self):
frame = wx.Frame(None, -1, 'test', (640, 440))
self.SetTopWindow(frame)
frame.Show(True)
return True
app = cTestApp()
app.MainLoop()
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
Karsten Hilbert wrote:
For me ...
... the attached code shows an app with one empty frame, as
expected. But the size is 400x250.
Why ?
(I would have expected it to be 640x440.)
class cTestApp(wx.App):
def OnInit(self):
frame = wx.Frame(None, -1, 'test', (640, 440))
Because the 4th parameter is position. Size is the 5th parameter. And,
indeed, your window is located at 640,440 on the desktop. This is a
good argument for named parameters.
···
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Ha ! Indeed it is, thanks.
As for the problem, forgive my denseness This was part
of quite aged code which was overriden by explicit size
setting later on in the app setup. I just stumbled upon it
while attempting to extract a Smallest Runnable Example for
some other code. Which, BTW, proved quite interesting:
I passed wx.LC_SINGLE_SEL to a *dialog* (rather than a
listctr as intended) -- which made the dialog maximized !
Is that to be expected ? I wasn't able to reconcile 8192
with any dialog style flags to that effect.
Karsten
···
On Mon, Aug 13, 2018 at 08:35:16AM -0700, Tim Roberts wrote:
Karsten Hilbert wrote:
> For me ...
> ... the attached code shows an app with one empty frame, as
> expected. But the size is 400x250.
>
> Why ?
>
> (I would have expected it to be 640x440.)
class cTestApp(wx.App):
def OnInit(self):
frame = wx.Frame(None, -1, 'test', (640, 440))
Because the 4th parameter is position. Size is the 5th parameter. And,
indeed, your window is located at 640,440 on the desktop. This is a
good argument for named parameters.
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
Very strange, when I tested that I could have sworn it showed
something different. In reality, I must have seen something
different.
Karsten
···
On Wed, Aug 15, 2018 at 10:18:32AM -0700, Robin Dunn wrote:
> I passed wx.LC_SINGLE_SEL to a *dialog* (rather than a
> listctr as intended) -- which made the dialog maximized !
> Is that to be expected ? I wasn't able to reconcile 8192
> with any dialog style flags to that effect.
>>> import wx
>>> wx.MAXIMIZE
8192
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B