wxPython 的 wx.Panel 的默认样式是什么?

What is the default style for wxPython's wx.Panel?

我正在编写一个微型工具包来自动创建 wxPython UI,虽然我实际上从未使用过样式参数(或者,实际上,除 Parent 之外的任何其他参数)作为然而,我想保留我的选择以备后用,并且有能力提供一个。在我的代码中设置事物的方式,我需要提供一个默认值。我只想保留 wxPython 默认值,但我不知道那是什么。 https://docs.wxpython.org/wx.Panel.html just says to see the documentation at https://docs.wxpython.org/wx.Panel.html. So I looked at the parent class, wx.Window, and the documentation at https://docs.wxpython.org/wx.Window.html says to see the documentation at https://docs.wxpython.org/wx.Window.html 处的文档。 (Phoenix 文档继承了原来的递归。)

首先,documentation指定了wx.Panel构造函数的默认值:

__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=TAB_TRAVERSAL, name=PanelNameStr)

然而,当有疑问时,您可以通过创建一个 wx.Panel 而不指定 style 参数并调用 wx.Panel.GetWindowStyle 来自行查找该值,例如:

import wx

app = wx.App()
frame = wx.Frame(None, title="Panel Default Style Checker")
panel = wx.Panel(frame)
print("wx.Panel default Window style:", panel.GetWindowStyle())
print("wx.Panel default Extra style:", panel.GetExtraStyle())
frame.Show()
app.MainLoop()