'状态栏添加按钮
<CommandMethod("AddButton")> _
Public Sub AddButton()
Dim Button As Pane = New Pane
Button.Enabled = True
Button.Text = "添加按钮实例"
Button.ToolTipText = "添加按钮实例 ToolTipsText"
Button.Visible = True
Button.Style = PaneStyles.Normal
AddHandler Button.MouseDown, AddressOf StatusBarButton1_MouseDown
Application.StatusBar.Panes.Add(Button)
End Sub
Sub StatusBarButton1_MouseDown(ByVal sender As Object, ByVal e As StatusBarMouseDownEventArgs)
Dim Button As Pane = sender
MsgBox("你按下了该按钮,你可在此添加你要执行的代码!")
End Sub
<CommandMethod("AddButton")> _
Public Sub AddButton()
Dim Button As Pane = New Pane
Button.Enabled = True
Button.Text = "添加按钮实例"
Button.ToolTipText = "添加按钮实例 ToolTipsText"
Button.Visible = True
Button.Style = PaneStyles.Normal
AddHandler Button.MouseDown, AddressOf StatusBarButton1_MouseDown
Application.StatusBar.Panes.Add(Button)
End Sub
Sub StatusBarButton1_MouseDown(ByVal sender As Object, ByVal e As StatusBarMouseDownEventArgs)
Dim Button As Pane = sender
MsgBox("你按下了该按钮,你可在此添加你要执行的代码!")
End Sub
Autodesk.AutoCAD.ApplicationServices.Application.StatusBar.Panes.Add
和Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.StatusBar.Panes.Add添加的效果是一样的。
[本日志由 tiancao1001 于 2009-12-30 05:30 PM 编辑]
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |