简体   繁体   中英

wxPython Frame with wx.CAPTION style, an upper left Icon and a closebox?

Needed is a fixed size frame with a title bar having only an icon, the title, and a close box. No minimize nor maximize box. Can it be done?

See http://docs.wxwidgets.org/stable/wx_wxframe.html#wxframe for the various styles available (sorry it's the wxwidgets ref...I couldn't find the wxPython version for some reason). You'd want to pass something like this to the frame's style parameter:

style = wx.SYSTEM_MENU | wx.CLOSE_BOX | wx.CLIP_CHILDREN

I'm not sure if you need the last one or not. Since you're not including RESIZE_BORDER, they won't be able to resize it. Another way to stop resizing is to use the SetSizeHints() method.

EDIT: You probably need wx.CAPTION if you're on Windows

您需要所有这些:

style = wx.SYSTEM_MENU | wx.CLOSEBOX | wx.CAPTION

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM