您的位置:首页 > 编程语言 > Python开发

wxPython 窗口实现透明

2012-08-16 13:49 1266 查看
#!/usr/bin/env python
#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)

self.Text = TextCtrl(self, style=TE_MULTILINE | HSCROLL)
self.Text.SetBackgroundColour('Black'), self.Text.SetForegroundColour('Steel Blue')
self.SetTransparent(200) #设置透明
self.Show()

app = App()
Trans(None, 1, "Transparent Window")
app.MainLoop()
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: