app/frame sizing question

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

app/frame sizing question

Karsten Hilbert
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
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

xtest-frame-only.py (233 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: app/frame sizing question

Karsten Hilbert
On Mon, Aug 13, 2018 at 10:10:57AM +0200, Karsten Hilbert wrote:

> 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.)

That one I *did* test BTW :)

Karsten


> 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

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: app/frame sizing question

Tim Roberts
In reply to this post by Karsten Hilbert
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, [hidden email]
Providenza & Boekelheide, Inc.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: app/frame sizing question

Karsten Hilbert
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.

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
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: app/frame sizing question

Robin Dunn
On Wednesday, August 15, 2018 at 2:57:58 AM UTC-7, Karsten Hilbert 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
>>>

 --
Robin

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: app/frame sizing question

Karsten Hilbert
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

Very strange, when I tested that I could have sworn it showed
something different. In reality, I must have seen something
different.

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.