Python第三天。
2004-08-11 19:03
344 查看
import CLR.System.Windows.Forms as WinForms
from CLR.System.Drawing import Size
from CLR.System.Drawing import Point
from CLR.System.Drawing import Color
from CLR.System.Drawing import SystemColors
class MacroApp(WinForms.Form):
def __init__(this):
this.Text = "Hello World"
this.BackColor = Color.LightGray
this.ClientSize = Size(450, 220)
this.FormBorderStyle = WinForms.FormBorderStyle.None
this.Opacity = 0.8
this.ShowInTaskbar = 0
this.TopMost = 1
this.button = WinForms.Button()
this.button.FlatStyle = 1
this.button.Dock = 2
this.button.Text = "Alert Text"
this.treeview = WinForms.TreeView()
this.treeview.BorderStyle = 2
this.treeview.Dock = 5
this.button.Click += this.button_Click
this.treeview.AfterSelect += this.treeView_AfterSelect
this.Load += this.MacroApp_Load
this.Controls.Add(this.button)
this.Controls.Add(this.treeview)
def button_Click(this, sender, args):
WinForms.MessageBox.Show(this, this.button.Text, this.button.Text, 4)
def MacroApp_Load(this, sender, args):
this.treeview.Nodes.Add("Java")
this.treeview.Nodes[0].Nodes.Add("Struts")
this.treeview.Nodes[0].Nodes.Add("Spring")
this.treeview.Nodes[0].Nodes.Add("Hibernate")
this.treeview.Nodes[0].Nodes.Add("Poolman")
this.treeview.Nodes.Add("C#")
this.treeview.Nodes[1].Nodes.Add("ADO.NET")
this.treeview.Nodes[1].Nodes.Add("ASP.NET")
this.treeview.Nodes[1].Nodes.Add("JScript.NET")
this.treeview.Nodes.Add("Python")
def treeView_AfterSelect(this, sender, args):
this.button.Text = args.Node.Text
#StdThread
WinForms.Application.Run(MacroApp())
from CLR.System.Drawing import Size
from CLR.System.Drawing import Point
from CLR.System.Drawing import Color
from CLR.System.Drawing import SystemColors
class MacroApp(WinForms.Form):
def __init__(this):
this.Text = "Hello World"
this.BackColor = Color.LightGray
this.ClientSize = Size(450, 220)
this.FormBorderStyle = WinForms.FormBorderStyle.None
this.Opacity = 0.8
this.ShowInTaskbar = 0
this.TopMost = 1
this.button = WinForms.Button()
this.button.FlatStyle = 1
this.button.Dock = 2
this.button.Text = "Alert Text"
this.treeview = WinForms.TreeView()
this.treeview.BorderStyle = 2
this.treeview.Dock = 5
this.button.Click += this.button_Click
this.treeview.AfterSelect += this.treeView_AfterSelect
this.Load += this.MacroApp_Load
this.Controls.Add(this.button)
this.Controls.Add(this.treeview)
def button_Click(this, sender, args):
WinForms.MessageBox.Show(this, this.button.Text, this.button.Text, 4)
def MacroApp_Load(this, sender, args):
this.treeview.Nodes.Add("Java")
this.treeview.Nodes[0].Nodes.Add("Struts")
this.treeview.Nodes[0].Nodes.Add("Spring")
this.treeview.Nodes[0].Nodes.Add("Hibernate")
this.treeview.Nodes[0].Nodes.Add("Poolman")
this.treeview.Nodes.Add("C#")
this.treeview.Nodes[1].Nodes.Add("ADO.NET")
this.treeview.Nodes[1].Nodes.Add("ASP.NET")
this.treeview.Nodes[1].Nodes.Add("JScript.NET")
this.treeview.Nodes.Add("Python")
def treeView_AfterSelect(this, sender, args):
this.button.Text = args.Node.Text
#StdThread
WinForms.Application.Run(MacroApp())
相关文章推荐
- Python第三天课后作业
- Python入门学习笔记第三天
- 初学Python第三天
- Python第三天 序列 5种数据类型 数值 字符串 列表 元组 字典
- Python第三天
- Python第三天——字符串的格式化、转义以及深浅复制
- python之haproxy配置文件操作(第三天)
- python 11期 第三天
- Python学习第三天
- Codecademy网学习Python第三天
- python的第三天
- 从零开始学python 第三天
- 跟着小甲鱼学Python第三天
- python基础第三天
- Python学习第三天
- 人工智能:python 实现 第十章,NLP 第三天 文本分块
- 【Python学习日记】 第三天
- Python Learning——第三天
- 学习python的第三天
- python学习——第三天