Incorrect size for Set wx.Frame size?

I am new to wxPython and I am finding some issues while seting a given size for both frames and windows (widgets). I have isolated the issue to the simplest case where I try to create a Frame of 250x250 pixels.

Running the code I get a window of an actual size of 295 width by 307
height (taking into consideration the Windows´s top window bar)

I am using Python 2.7 in Windows 10.

What am I missing? Thanks

#!/bin/env python
import wx

App Class

class MyAppTest7(wx.App):

def OnInit(self):

frame = AppFrame(title = u’Hello World’, pos=(50, 60), size=(250, 250))
frame.Show()
self.SetTopWindow(frame)
return True

AppFrame

class AppFrame(wx.Frame):
def init(self, title, pos, size):
wx.Frame.init(self, parent=None, id=-1, title=title, pos=pos, size=size)

if name == ‘main’:
app = MyAppTest7(False)
app.MainLoop()

``


I tried your code in both Windows 7 and Xubuntu Trusty, and in both cases
the window I got was 250 x 250.

···

On Sat, Sep 10, 2016 at 11:26 AM, Usk7 <uskerine@gmail.com> wrote:

I am new to wxPython and I am finding some issues while seting a given
size for both frames and windows (widgets). I have isolated the issue to
the simplest case where I try to create a Frame of 250x250 pixels.

--
Best Regards,
Michael Moriarity

It is not working -or I am missing something relevant- in Windows 10.

See another test:

#!/bin/env python
import wx

class MyApp(wx.App):
 def OnInit(self):
 self.frame = MyFrame(None, title="The Main Frame")
 self.SetTopWindow(self.frame)
 self.frame.Show(True)
 return True

class MyFrame(wx.Frame):
 def __init__(self, parent, id=wx.ID_ANY, title="", pos=wx.DefaultPosition, size=(300,100), style=wx.DEFAULT_FRAME_STYLE, name="MyFrame"):
 super(MyFrame, self).__init__(parent, id, title, pos, size, style, name)
 self.panel = wx.Panel(self)

if __name__ == "__main__":
 app = MyApp(False)
 app.MainLoop()

I would expect the window (wx.Frame) having 300 pixels width.
But as you can see in image below (it is a screenshot for the run application of the above´s code) width is 357 (see bottom bar of Paint application).

![Auto Generated Inline Image 1.png|1920x1030](upload://qNoituNzqHa0fP0OZN1PrXOwo5g.png)

<details class='elided'>
<summary title='Show trimmed content'>&#183;&#183;&#183;</summary>

On Saturday, September 10, 2016 at 7:55:56 PM UTC+2, Data...@gmail.com wrote:
> On Sat, Sep 10, 2016 at 11:26 AM, Usk7 <uske...@gmail.com> wrote:
> > 
> > I am new to wxPython and I am finding some issues while seting a given size for both frames and windows (widgets). I have isolated the issue to the simplest case where I try to create a Frame of 250x250 pixels.

> 

> I tried your code in both Windows 7 and Xubuntu Trusty, and in both cases the window I got was 250 x 250.

> 

> --
> Best Regards,
> Michael Moriarity

</details>