Problem with control appearance

Hello, I begin with Wx and have a problem… I have a Windows 10 PC with the following configuration :
Python 3.8.8rc1 (tags/v3.8.8rc1:dfd7d68, Feb 17 2021, 11:01:21) [MSC v.1928 64 bit (AMD64)] on win32
Wx 4.1.1 installed using PIP

The following sample code
import wx
app = wx.App()
mystyles = wx.SYSTEM_MENU | wx.CLOSE_BOX | wx.CAPTION | wx.MINIMIZE_BOX
fra = wx.Frame(None, title=“learning”, style=mystyles, size=(200, 200))
panel = wx.Panel(fra)
button = wx.Button(panel, label=“Press Me”)
fra.Show()
app.MainLoop()

And the result is
Capture-Test

As you can see, the button look is more Windows 98 or XP than W 7 or 10.

Am I missed something ?

Thanks in advance for your replies !
Franck

First you should provide an ‘id’ for frame. id=wx.ID_ANY
Second, there are plenty of buttons available - see the wxpython demo code.
Thrid, the control look depends on the OS. In my case I use linux and I have rounded corners.
Johnf

Thanks for your reply. I put an Id to my frame, and a position for the button. I will have a look to the demo code.

In addition, something that has been confusing for me is the wx documentation.

Followed…As you can see, if you choose Button, the result is a little bit different… But conform to the standard Windows buttons

Capture3

I noticed that you suggested that you are adding ‘position’. Please look into using ‘sizers’. Lot’s of demo’s available.
Johnf

Thanks, but I am not sure that using sizers will change the appearance of my button…

The button looks fine. It’s a native Windows button. It’s being displayed with a blue border as it has the keyboard focus. Add a second one and you’ll see at least one without a border.

For starting into wxPython you may want to have a look at wxGlade. It will save you from typing such code.