wxpython不要标题栏

时间:2024-03-13 11:10:49
#coding:utf-8

from wx import *

class Trans(Frame):
    def __init__(self, parent, id, title):
        #Frame.__init__(self, parent, id, title, size=(700, 500), style=DEFAULT_FRAME_STYLE | STAY_ON_TOP)
#frame = wx.Frame(None,style=0)  
#Frame.__init__(self, parent, id, title, size=(700, 500), style=DEFAULT_FRAME_STYLE | STAY_ON_TOP)
        Frame.__init__(self, parent, id, title, size=(700, 500), style=STAY_ON_TOP)
        self.Text = TextCtrl(self, style=TE_MULTILINE | HSCROLL,size=(700, 500))
        self.Text.SetBackgroundColour('Black'), self.Text.SetForegroundColour('Steel Blue')
        self.SetTransparent(200) #设置透明
        self.Show()

app = App()
frm1=Trans(None, 1, "Transparent Window")
frm1.MoveXY(300,300)
app.MainLoop()

wxpython不要标题栏