Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Display Text only for a button tool in an popupmenu tool in ToolbarManger
posted

Hi ,

I have an Toolbarmanger, in which i have added in an popupmenutool -- to which i have added in some button tools.

i am trying to display only text in Button tool ,

i have tried to do this both by designer and also by code like

XXXXXX.SharedProps.DisplayStyle = ToolDisplayStyle.TextOnlyAlways;

but it doesn't work.

i am deriving from another form where the toolbar manger is located.. but this popupmenu tool is a new tool which i am adding.

Please help.

Thank you.

  • 5
    posted

    I'm having the same issue.  If I create a New ButtonTool, and set it's Caption, then I only get the text.  However, when the form has too many items added for the width, it displays a red 'X'.  So I set the CustomizedImage property, and it displays both the icon and the text.  When the text doesn't fit, only the icon is displayed.  Setting the DisplayStyle to TextOnlyAlways dosen't make a difference.

    Dim newTool As New ButtonTool(toolKey)
    newTool.CustomizedImage = getToolIcon()
    newTool.SharedProps.Caption = appearance.Caption
    newTool.CustomizedDisplayStyle = ToolDisplayStyle.TextOnlyAlways
    newTool.SharedProps.DisplayStyle = ToolDisplayStyle.TextOnlyAlways
    newTool = currentWorkItem.UIExtensionSites(groupKey).Add(Of ButtonTool)(newTool)