Display Discription and Macro Command on ribbon

Display Discription and Macro Command on ribbon

Anonymous
Not applicable
594 Views
1 Reply
Message 1 of 2

Display Discription and Macro Command on ribbon

Anonymous
Not applicable

Would somone be able to tell me how i can add a discription to my button so i can give a discription when somone hovers over it and also say what macro it is going to run

 

This is my button at the moment

 

Dim storetree As New RibbonButton()
            storetree.Text = "Store"
            storetree.ToolTip = "Store"
            storetree.ShowText = True
            storetree.ShowImage = True
            storetree.Image = Images.getBitmap(My.Resources.Store)
            storetree.LargeImage = Images.getBitmap(My.Resources.Store_L)
            storetree.Orientation = System.Windows.Controls.Orientation.Vertical
            storetree.Size = RibbonItemSize.Large
            storetree.CommandHandler = New RibbonCommandHandler()
            storetree.Id = "_Storetree"

 

 

0 Likes
Accepted solutions (1)
595 Views
1 Reply
Reply (1)
Message 2 of 2

norman.yuan
Mentor
Mentor
Accepted solution

Look into RibbonToolTip object. The code would be like:

 

RibbonToolTip tip=new RibbonToolTip();

tip.Title="My Command";

tip.Content="Do something wonderful";

tip.Command="MyCmd";

 

storetree.ToolTip=tip;

 

Norman Yuan

Drive CAD With Code

EESignature