<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What's wrong with the TrayItem's event? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372910#M84451</link>
    <description>Albert,&lt;BR /&gt;
&lt;BR /&gt;
Excellent example, thanks.  Having played with this for a few minutes, &lt;BR /&gt;
I'm really intrigued by the Popup pane style.  It looks as though it's &lt;BR /&gt;
meant to attach a menu item to.  Any chance you could make a simple &lt;BR /&gt;
example showing a menu popup and a click handler on a menu item?  (or &lt;BR /&gt;
would the menu events handle the click?)&lt;BR /&gt;
&lt;BR /&gt;
Something like a menu with "Say Hello" and an event handler of MsgBox &lt;BR /&gt;
("Hello world")?  I can run with it from there.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for your help, and thanks for everything you do here &lt;BR /&gt;
for us,&lt;BR /&gt;
-Danny Polkinhorn&lt;BR /&gt;
WATG&lt;BR /&gt;
Honolulu&lt;BR /&gt;
&lt;BR /&gt;
PS:  Here's the VB port (as well as I can do it, watch for wrapping)...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Imports Autodesk.AutoCAD.Runtime&lt;BR /&gt;
Imports Autodesk.AutoCAD.ApplicationServices&lt;BR /&gt;
Imports Autodesk.AutoCAD.DatabaseServices&lt;BR /&gt;
Imports Autodesk.AutoCAD.Windows&lt;BR /&gt;
&lt;BR /&gt;
Public Class TestStatusBarPane&lt;BR /&gt;
&lt;BR /&gt;
     &lt;COMMANDMETHOD&gt; _&lt;BR /&gt;
     Public Sub DoIt()&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Application &lt;BR /&gt;
Statusbar " + ControlChars.Lf)&lt;BR /&gt;
         Dim sb As StatusBar = &lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.Application.StatusBar&lt;BR /&gt;
&lt;BR /&gt;
         ' add a new pane&lt;BR /&gt;
         Dim newPane As New Pane&lt;BR /&gt;
         newPane.Text = "Scale: 1/8'' = 1'-0''"&lt;BR /&gt;
         newPane.ToolTipText = "Default Scale"&lt;BR /&gt;
         newPane.Visible = True&lt;BR /&gt;
         newPane.MinimumWidth = 40&lt;BR /&gt;
         newPane.Style = PaneStyles.PopUp&lt;BR /&gt;
&lt;BR /&gt;
         AddHandler newPane.MouseDown, AddressOf paneMouseDown&lt;BR /&gt;
&lt;BR /&gt;
         sb.Panes.Add(newPane)&lt;BR /&gt;
&lt;BR /&gt;
         Dim panes As PaneCollection = sb.Panes&lt;BR /&gt;
         Dim p As Pane&lt;BR /&gt;
         For Each p In panes&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
-- {0}" + ControlChars.Lf, p.Text)&lt;BR /&gt;
         Next p&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Document &lt;BR /&gt;
Statusbar " + ControlChars.Lf)&lt;BR /&gt;
         sb = Application.DocumentManager.MdiActiveDocument.StatusBar&lt;BR /&gt;
         panes = sb.Panes&lt;BR /&gt;
         For Each p In panes&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
-- {0}" + ControlChars.Lf, p.Text)&lt;BR /&gt;
         Next p&lt;BR /&gt;
     End Sub 'DoIt&lt;BR /&gt;
&lt;BR /&gt;
     Shared Sub paneMouseDown(ByVal o As Object, ByVal e As &lt;BR /&gt;
StatusBarMouseDownEventArgs)&lt;BR /&gt;
         Dim p As Pane = CType(o, Pane)&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
-- {0} {1}, Style: " + ControlChars.Lf, p.Text, e.Button, p.Style.ToString)&lt;BR /&gt;
     End Sub 'paneMouseDown&lt;BR /&gt;
&lt;BR /&gt;
     Shared Sub trayMouseDown(ByVal o As Object, ByVal e As &lt;BR /&gt;
StatusBarMouseDownEventArgs)&lt;BR /&gt;
         Dim ti As TrayItem = CType(o, TrayItem)&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Tray &lt;BR /&gt;
on Click {0} {1}" + ControlChars.Lf, ti.ToolTipText, e.Button)&lt;BR /&gt;
         ti.CloseBubbleWindows()&lt;BR /&gt;
     End Sub 'trayMouseDown&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
     Shared Sub bubbleClosed(ByVal o As Object, ByVal e As &lt;BR /&gt;
TrayItemBubbleWindowClosedEventArgs)&lt;BR /&gt;
         Dim bubble As TrayItemBubbleWindow = CType(o, TrayItemBubbleWindow)&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Bubble &lt;BR /&gt;
'{0}' closed on Click -- {1}" + ControlChars.Lf, bubble.Title, &lt;BR /&gt;
e.CloseReason)&lt;BR /&gt;
     End Sub 'bubbleClosed&lt;BR /&gt;
&lt;BR /&gt;
     Public Class TestStatusBarTray&lt;BR /&gt;
&lt;BR /&gt;
         Private Shared oneNewTi As TrayItem = Nothing&lt;BR /&gt;
&lt;BR /&gt;
         &lt;COMMANDMETHOD&gt; _&lt;BR /&gt;
         Public Sub DoIt()&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Status &lt;BR /&gt;
Bar Tray Item test " + ControlChars.Lf)&lt;BR /&gt;
             Dim sb As StatusBar = Application.StatusBar&lt;BR /&gt;
&lt;BR /&gt;
             Dim tis As TrayItemCollection = sb.TrayItems&lt;BR /&gt;
             Dim oneTi As TrayItem = Nothing&lt;BR /&gt;
             Dim ti As TrayItem&lt;BR /&gt;
             For Each ti In tis&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Tray &lt;BR /&gt;
-- {0}" + ControlChars.Lf, ti.ToolTipText)&lt;BR /&gt;
                 oneTi = ti&lt;BR /&gt;
             Next ti&lt;BR /&gt;
&lt;BR /&gt;
             If Not (oneTi Is Nothing) And oneNewTi Is Nothing Then&lt;BR /&gt;
                 oneNewTi = New TrayItem&lt;BR /&gt;
                 oneNewTi.Visible = True&lt;BR /&gt;
                 oneNewTi.Icon = oneTi.Icon&lt;BR /&gt;
                 oneNewTi.ToolTipText = "copy of " + oneTi.ToolTipText&lt;BR /&gt;
                 tis.Add(oneNewTi)&lt;BR /&gt;
&lt;BR /&gt;
                 AddHandler oneNewTi.MouseDown, AddressOf trayMouseDown&lt;BR /&gt;
             End If&lt;BR /&gt;
&lt;BR /&gt;
             Dim bubble As New TrayItemBubbleWindow&lt;BR /&gt;
             bubble.Text = "Bubble Text"&lt;BR /&gt;
             bubble.Title = "Bubble Title"&lt;BR /&gt;
             bubble.HyperLink = "http://google.com"&lt;BR /&gt;
             bubble.HyperText = "Cool site"&lt;BR /&gt;
             oneNewTi.ShowBubbleWindow(bubble)&lt;BR /&gt;
             AddHandler bubble.Closed, AddressOf bubbleClosed&lt;BR /&gt;
         End Sub 'DoIt&lt;BR /&gt;
     End Class 'TestStatusBarTray&lt;BR /&gt;
End Class 'TestStatusBarPane&lt;/COMMANDMETHOD&gt;&lt;/COMMANDMETHOD&gt;</description>
    <pubDate>Fri, 08 Jul 2005 02:55:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-07-08T02:55:49Z</dc:date>
    <item>
      <title>What's wrong with the TrayItem's event?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372908#M84449</link>
      <description>There happens nothing when I click on the trayitem.&lt;BR /&gt;
[CommandMethod("Test")]&lt;BR /&gt;
static public void test() &lt;BR /&gt;
		{&lt;BR /&gt;
			TrayItem item=acadApp.StatusBar.TrayItems[0];&lt;BR /&gt;
			item.MouseDown+=new StatusBarMouseDownEventHandler(item_MouseDown);&lt;BR /&gt;
		}&lt;BR /&gt;
private static void item_MouseDown(object sender, StatusBarMouseDownEventArgs e)&lt;BR /&gt;
		{&lt;BR /&gt;
			System.Windows.Forms.MessageBox.Show("Tray Item Clicked");&lt;BR /&gt;
		}</description>
      <pubDate>Thu, 07 Jul 2005 00:55:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372908#M84449</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-07T00:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with the TrayItem's event?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372909#M84450</link>
      <description>You can only sink the events for the tray items that you created:&lt;BR /&gt;
&lt;BR /&gt;
public class TestStatusBarPane&lt;BR /&gt;
    {&lt;BR /&gt;
        /// &lt;SUMMARY&gt;&lt;BR /&gt;
        [CommandMethod("PANETEST")]&lt;BR /&gt;
        public void DoIt()&lt;BR /&gt;
        {&lt;BR /&gt;
&lt;BR /&gt;
            Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Application &lt;BR /&gt;
Statusbar \n");&lt;BR /&gt;
            StatusBar sb = Application.StatusBar;&lt;BR /&gt;
&lt;BR /&gt;
            // add a new pane&lt;BR /&gt;
            Pane newPane = new Pane();&lt;BR /&gt;
            newPane.Text = "Hello";&lt;BR /&gt;
            newPane.ToolTipText = "Hello Tip";&lt;BR /&gt;
            newPane.Visible = true;&lt;BR /&gt;
            newPane.MinimumWidth = 40;&lt;BR /&gt;
            newPane.Style = PaneStyles.Normal;&lt;BR /&gt;
&lt;BR /&gt;
            newPane.MouseDown += new &lt;BR /&gt;
StatusBarMouseDownEventHandler(paneMouseDown);&lt;BR /&gt;
&lt;BR /&gt;
            sb.Panes.Add(newPane);&lt;BR /&gt;
&lt;BR /&gt;
            PaneCollection panes = sb.Panes;&lt;BR /&gt;
            foreach (Pane p in panes)&lt;BR /&gt;
            {&lt;BR /&gt;
                Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
 -- {0}\n", p.Text);&lt;BR /&gt;
            }&lt;BR /&gt;
&lt;BR /&gt;
            Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Document &lt;BR /&gt;
Statusbar \n");&lt;BR /&gt;
            sb = Application.DocumentManager.MdiActiveDocument.StatusBar;&lt;BR /&gt;
            panes = sb.Panes;&lt;BR /&gt;
            foreach (Pane p in panes)&lt;BR /&gt;
            {&lt;BR /&gt;
                Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
 -- {0}\n", p.Text);&lt;BR /&gt;
&lt;BR /&gt;
            }&lt;BR /&gt;
&lt;BR /&gt;
        }&lt;BR /&gt;
        static void paneMouseDown(Object o, StatusBarMouseDownEventArgs e)&lt;BR /&gt;
        {&lt;BR /&gt;
            Pane p = (Pane) o;&lt;BR /&gt;
            Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
on Click-- {0} {1}\n", p.Text, e.Button);&lt;BR /&gt;
        }&lt;BR /&gt;
&lt;BR /&gt;
        static void trayMouseDown(Object o, StatusBarMouseDownEventArgs e)&lt;BR /&gt;
        {&lt;BR /&gt;
            TrayItem ti = (TrayItem) o;&lt;BR /&gt;
            Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Tray &lt;BR /&gt;
on Click-- {0} {1}\n", ti.ToolTipText, e.Button);&lt;BR /&gt;
            ti.CloseBubbleWindows();&lt;BR /&gt;
        }&lt;BR /&gt;
&lt;BR /&gt;
        static void bubbleClosed(Object o, &lt;BR /&gt;
TrayItemBubbleWindowClosedEventArgs e)&lt;BR /&gt;
        {&lt;BR /&gt;
            TrayItemBubbleWindow bubble = (TrayItemBubbleWindow) o;&lt;BR /&gt;
            Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Bubble &lt;BR /&gt;
'{0}' closed on Click -- {1}\n", bubble.Title, e.CloseReason);&lt;BR /&gt;
&lt;BR /&gt;
        }&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
        public class TestStatusBarTray&lt;BR /&gt;
        {&lt;BR /&gt;
            static TrayItem oneNewTi = null;&lt;BR /&gt;
            /// &lt;SUMMARY&gt;&lt;BR /&gt;
            [CommandMethod("TRAYTEST")]&lt;BR /&gt;
            public void DoIt()&lt;BR /&gt;
            {&lt;BR /&gt;
&lt;BR /&gt;
                Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Status &lt;BR /&gt;
Bar Tray Item test \n");&lt;BR /&gt;
                StatusBar sb = Application.StatusBar;&lt;BR /&gt;
&lt;BR /&gt;
                TrayItemCollection tis = sb.TrayItems;&lt;BR /&gt;
                TrayItem oneTi = null;&lt;BR /&gt;
                foreach (TrayItem ti in tis)&lt;BR /&gt;
                {&lt;BR /&gt;
                    Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Tray &lt;BR /&gt;
 -- {0}\n", ti.ToolTipText);&lt;BR /&gt;
                    oneTi = ti;&lt;BR /&gt;
                }&lt;BR /&gt;
&lt;BR /&gt;
                if (oneTi != null &amp;amp;&amp;amp; oneNewTi == null)&lt;BR /&gt;
                {&lt;BR /&gt;
                    oneNewTi = new TrayItem();&lt;BR /&gt;
                    oneNewTi.Visible = true;&lt;BR /&gt;
                    oneNewTi.Icon = oneTi.Icon;&lt;BR /&gt;
                    oneNewTi.ToolTipText = "copy of " + oneTi.ToolTipText;&lt;BR /&gt;
                    tis.Add(oneNewTi);&lt;BR /&gt;
&lt;BR /&gt;
                    oneNewTi.MouseDown += new &lt;BR /&gt;
StatusBarMouseDownEventHandler(trayMouseDown);&lt;BR /&gt;
                }&lt;BR /&gt;
&lt;BR /&gt;
                TrayItemBubbleWindow bubble = new TrayItemBubbleWindow();&lt;BR /&gt;
                bubble.Text = "Bubble Text";&lt;BR /&gt;
                bubble.Title = "Bubble Title";&lt;BR /&gt;
                bubble.HyperLink = "http://google.com";&lt;BR /&gt;
                bubble.HyperText = "Cool site";&lt;BR /&gt;
                oneNewTi.ShowBubbleWindow(bubble);&lt;BR /&gt;
                bubble.Closed += new &lt;BR /&gt;
TrayItemBubbleWindowClosedEventHandler(bubbleClosed);&lt;BR /&gt;
&lt;BR /&gt;
            }&lt;BR /&gt;
        }&lt;BR /&gt;
    }&lt;BR /&gt;
&lt;BR /&gt;
&lt;TANGFERRY&gt; wrote in message news:4894583@discussion.autodesk.com...&lt;BR /&gt;
There happens nothing when I click on the trayitem.&lt;BR /&gt;
[CommandMethod("Test")]&lt;BR /&gt;
static public void test()&lt;BR /&gt;
{&lt;BR /&gt;
TrayItem item=acadApp.StatusBar.TrayItems[0];&lt;BR /&gt;
item.MouseDown+=new StatusBarMouseDownEventHandler(item_MouseDown);&lt;BR /&gt;
}&lt;BR /&gt;
private static void item_MouseDown(object sender, &lt;BR /&gt;
StatusBarMouseDownEventArgs e)&lt;BR /&gt;
{&lt;BR /&gt;
System.Windows.Forms.MessageBox.Show("Tray Item Clicked");&lt;BR /&gt;
}&lt;/TANGFERRY&gt;&lt;/SUMMARY&gt;&lt;/SUMMARY&gt;</description>
      <pubDate>Thu, 07 Jul 2005 17:16:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372909#M84450</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-07T17:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with the TrayItem's event?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372910#M84451</link>
      <description>Albert,&lt;BR /&gt;
&lt;BR /&gt;
Excellent example, thanks.  Having played with this for a few minutes, &lt;BR /&gt;
I'm really intrigued by the Popup pane style.  It looks as though it's &lt;BR /&gt;
meant to attach a menu item to.  Any chance you could make a simple &lt;BR /&gt;
example showing a menu popup and a click handler on a menu item?  (or &lt;BR /&gt;
would the menu events handle the click?)&lt;BR /&gt;
&lt;BR /&gt;
Something like a menu with "Say Hello" and an event handler of MsgBox &lt;BR /&gt;
("Hello world")?  I can run with it from there.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance for your help, and thanks for everything you do here &lt;BR /&gt;
for us,&lt;BR /&gt;
-Danny Polkinhorn&lt;BR /&gt;
WATG&lt;BR /&gt;
Honolulu&lt;BR /&gt;
&lt;BR /&gt;
PS:  Here's the VB port (as well as I can do it, watch for wrapping)...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Imports Autodesk.AutoCAD.Runtime&lt;BR /&gt;
Imports Autodesk.AutoCAD.ApplicationServices&lt;BR /&gt;
Imports Autodesk.AutoCAD.DatabaseServices&lt;BR /&gt;
Imports Autodesk.AutoCAD.Windows&lt;BR /&gt;
&lt;BR /&gt;
Public Class TestStatusBarPane&lt;BR /&gt;
&lt;BR /&gt;
     &lt;COMMANDMETHOD&gt; _&lt;BR /&gt;
     Public Sub DoIt()&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Application &lt;BR /&gt;
Statusbar " + ControlChars.Lf)&lt;BR /&gt;
         Dim sb As StatusBar = &lt;BR /&gt;
Autodesk.AutoCAD.ApplicationServices.Application.StatusBar&lt;BR /&gt;
&lt;BR /&gt;
         ' add a new pane&lt;BR /&gt;
         Dim newPane As New Pane&lt;BR /&gt;
         newPane.Text = "Scale: 1/8'' = 1'-0''"&lt;BR /&gt;
         newPane.ToolTipText = "Default Scale"&lt;BR /&gt;
         newPane.Visible = True&lt;BR /&gt;
         newPane.MinimumWidth = 40&lt;BR /&gt;
         newPane.Style = PaneStyles.PopUp&lt;BR /&gt;
&lt;BR /&gt;
         AddHandler newPane.MouseDown, AddressOf paneMouseDown&lt;BR /&gt;
&lt;BR /&gt;
         sb.Panes.Add(newPane)&lt;BR /&gt;
&lt;BR /&gt;
         Dim panes As PaneCollection = sb.Panes&lt;BR /&gt;
         Dim p As Pane&lt;BR /&gt;
         For Each p In panes&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
-- {0}" + ControlChars.Lf, p.Text)&lt;BR /&gt;
         Next p&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Document &lt;BR /&gt;
Statusbar " + ControlChars.Lf)&lt;BR /&gt;
         sb = Application.DocumentManager.MdiActiveDocument.StatusBar&lt;BR /&gt;
         panes = sb.Panes&lt;BR /&gt;
         For Each p In panes&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
-- {0}" + ControlChars.Lf, p.Text)&lt;BR /&gt;
         Next p&lt;BR /&gt;
     End Sub 'DoIt&lt;BR /&gt;
&lt;BR /&gt;
     Shared Sub paneMouseDown(ByVal o As Object, ByVal e As &lt;BR /&gt;
StatusBarMouseDownEventArgs)&lt;BR /&gt;
         Dim p As Pane = CType(o, Pane)&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Pane &lt;BR /&gt;
-- {0} {1}, Style: " + ControlChars.Lf, p.Text, e.Button, p.Style.ToString)&lt;BR /&gt;
     End Sub 'paneMouseDown&lt;BR /&gt;
&lt;BR /&gt;
     Shared Sub trayMouseDown(ByVal o As Object, ByVal e As &lt;BR /&gt;
StatusBarMouseDownEventArgs)&lt;BR /&gt;
         Dim ti As TrayItem = CType(o, TrayItem)&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Tray &lt;BR /&gt;
on Click {0} {1}" + ControlChars.Lf, ti.ToolTipText, e.Button)&lt;BR /&gt;
         ti.CloseBubbleWindows()&lt;BR /&gt;
     End Sub 'trayMouseDown&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
     Shared Sub bubbleClosed(ByVal o As Object, ByVal e As &lt;BR /&gt;
TrayItemBubbleWindowClosedEventArgs)&lt;BR /&gt;
         Dim bubble As TrayItemBubbleWindow = CType(o, TrayItemBubbleWindow)&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Bubble &lt;BR /&gt;
'{0}' closed on Click -- {1}" + ControlChars.Lf, bubble.Title, &lt;BR /&gt;
e.CloseReason)&lt;BR /&gt;
     End Sub 'bubbleClosed&lt;BR /&gt;
&lt;BR /&gt;
     Public Class TestStatusBarTray&lt;BR /&gt;
&lt;BR /&gt;
         Private Shared oneNewTi As TrayItem = Nothing&lt;BR /&gt;
&lt;BR /&gt;
         &lt;COMMANDMETHOD&gt; _&lt;BR /&gt;
         Public Sub DoIt()&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Status &lt;BR /&gt;
Bar Tray Item test " + ControlChars.Lf)&lt;BR /&gt;
             Dim sb As StatusBar = Application.StatusBar&lt;BR /&gt;
&lt;BR /&gt;
             Dim tis As TrayItemCollection = sb.TrayItems&lt;BR /&gt;
             Dim oneTi As TrayItem = Nothing&lt;BR /&gt;
             Dim ti As TrayItem&lt;BR /&gt;
             For Each ti In tis&lt;BR /&gt;
 &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("Tray &lt;BR /&gt;
-- {0}" + ControlChars.Lf, ti.ToolTipText)&lt;BR /&gt;
                 oneTi = ti&lt;BR /&gt;
             Next ti&lt;BR /&gt;
&lt;BR /&gt;
             If Not (oneTi Is Nothing) And oneNewTi Is Nothing Then&lt;BR /&gt;
                 oneNewTi = New TrayItem&lt;BR /&gt;
                 oneNewTi.Visible = True&lt;BR /&gt;
                 oneNewTi.Icon = oneTi.Icon&lt;BR /&gt;
                 oneNewTi.ToolTipText = "copy of " + oneTi.ToolTipText&lt;BR /&gt;
                 tis.Add(oneNewTi)&lt;BR /&gt;
&lt;BR /&gt;
                 AddHandler oneNewTi.MouseDown, AddressOf trayMouseDown&lt;BR /&gt;
             End If&lt;BR /&gt;
&lt;BR /&gt;
             Dim bubble As New TrayItemBubbleWindow&lt;BR /&gt;
             bubble.Text = "Bubble Text"&lt;BR /&gt;
             bubble.Title = "Bubble Title"&lt;BR /&gt;
             bubble.HyperLink = "http://google.com"&lt;BR /&gt;
             bubble.HyperText = "Cool site"&lt;BR /&gt;
             oneNewTi.ShowBubbleWindow(bubble)&lt;BR /&gt;
             AddHandler bubble.Closed, AddressOf bubbleClosed&lt;BR /&gt;
         End Sub 'DoIt&lt;BR /&gt;
     End Class 'TestStatusBarTray&lt;BR /&gt;
End Class 'TestStatusBarPane&lt;/COMMANDMETHOD&gt;&lt;/COMMANDMETHOD&gt;</description>
      <pubDate>Fri, 08 Jul 2005 02:55:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372910#M84451</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-07-08T02:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: What's wrong with the TrayItem's event?</title>
      <link>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372911#M84452</link>
      <description>hmm... i'm frustrated, i'm using this code and there's no bubble coming up... does anyone know why?</description>
      <pubDate>Fri, 29 Feb 2008 17:53:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/what-s-wrong-with-the-trayitem-s-event/m-p/1372911#M84452</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-02-29T17:53:56Z</dc:date>
    </item>
  </channel>
</rss>

