我正在创建一个无法调整大小的wx.Frame
。
如何禁用状态栏右侧的尺寸夹点?在
引用http://docs.wxwidgets.org/2.6/wx_wxstatusbar.html#wxstatusbar:
Window styles
wxST_SIZEGRIP -- On Windows 95, displays a gripper at right-hand side of the status bar.
转换为wxPython时,它应该是wx.ST_SIZEGRIP
。这是我的代码:
import wx
class Frame(wx.Frame):
def __init__(self, parent, title):
wx.Frame.__init__(self, parent=parent, id=wx.ID_ANY, title=title,
style=wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX),
pos=(20, 20))
self.createStatusBar()
self.Show()
def createStatusBar(self):
statusBar = self.CreateStatusBar()
statusBar.SetWindowStyle(statusBar.GetWindowStyle() ^ wx.ST_SIZEGRIP)
if __name__ == '__main__':
app = wx.PySimpleApp(False)
frame = Frame(parent=None, title="Any title")
app.MainLoop()
不幸的是,尺寸控制仍然存在。有什么办法让它消失吗?在
不要在以后设置样式,而是在创建时设置
您可以尝试其他样式的状态栏,如果他们存在。在
相关问题 更多 >
编程相关推荐