I am using python 3.6 , wxPython '4.0.3 msw (phoenix) wxWidgets 3.0.5' on Windows 10. I am trying to set the size of the button but it is not working. The size of frame was changing but not that of the button. The button takes up the whole frame. Here is my code:
import wx
app = wx.App()
panel = wx.Panel()
mystyles = wx.SYSTEM_MENU | wx.CLOSE_BOX | wx.CAPTION | wx.MINIMIZE_BOX
fra = wx.Frame(panel,title="learning",style=mystyles,size=(200,200))
button = wx.Button(fra,label="Press Me",size=(10,10))
fra.Show()
app.MainLoop()
Here is a screenshot:
