Progressive Tooltip on button

Progressive Tooltip on button

Anonymous
Not applicable
1,105 Views
2 Replies
Message 1 of 3

Progressive Tooltip on button

Anonymous
Not applicable

Please help! how to set to ProgressiveToolTip.Image Property for my new Inventor add-in ?

 Dim mbp10 As ProgressiveToolTip
 mbp10 = m_featureCountButtonDef10.ProgressiveToolTip
 mbp10.Title = "main title"
 mbp10.Description = "description for main title"
 mbp10.ExpandedDescription = "extended description for main title"
 mbp10.Image= ???  (as object)

 

thank you.

0 Likes
Accepted solutions (1)
1,106 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

how add image to ProgressiveToolTip?

0 Likes
Message 3 of 3

xiaodong_liang
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

ControlDefinition.ProgressiveToolTip  provides access to enhanced tooltip display for controls in the ribbon interface. Following is a demo. You can see how to set the image.

Public Sub ProgressiveToolTips()

  Dim g_FilePath As String
  g_FilePath = "C:\temp\"
  
    ' Create the button definition.
    Dim smallIcon As IPictureDisp
    Set smallIcon = LoadPicture(g_FilePath & "SmallProgTooltip.bmp")
    Dim largeIcon As IPictureDisp
    Set largeIcon = LoadPicture(g_FilePath & "LargeProgTooltip.bmp")
    Dim buttonDef As ButtonDefinition
    Set buttonDef = ThisApplication.CommandManager.ControlDefinitions.AddButtonDefinition("Sample", "SampleCommand", kQueryOnlyCmdType, "", "Sample command to show progressive tool tips.", "Sample", smallIcon, largeIcon)
    
    ' Add a control to the Work Feature panel of the Model tab of the Part ribbon.
    Call ThisApplication.UserInterfaceManager.Ribbons.Item("Part").RibbonTabs.Item("id_TabModel").RibbonPanels.Item("id_PanelA_ModelWorkFeatures").CommandControls.AddButton(buttonDef, True)
    
    ' Define the progressive tooltip.  This would typically be done in the
    ' same section of code where the button definition is created but there's
    ' a problem with the beta version where the progressive tooltip can only
    ' be defined on a control has been created.
    With buttonDef.ProgressiveToolTip
        .Description = "The short description."
        .ExpandedDescription = "This is the long expaned version of the description that could have a more complete description to accompany the picture."
        Dim progImage As IPictureDisp
        Set progImage = LoadPicture(g_FilePath & "ProgTooltip.bmp")
        .Image = progImage
        .IsProgressive = True
        .Title = "Sample"
    End With
End Sub