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
2094
Can't Change Tool Caption on Ribbon
posted

I am trying to change the caption of a Statebutton on a ribbon. But it does not work. It does not give an error but it just doesn't change the text. I am using 2007.3 

Private Sub UltraToolbarsManager1_ToolClick(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles UltraToolbarsManager1.ToolClick

e.Tool.InstanceProps.Caption = "Exam View"


I have also tried casting into that object and setting it but that also does not work.

Dim stbtn As StateButtonTool = DirectCast(e.Tool, StateButtonTool)
stbtn.InstanceProps.Caption = "Custom Text Caption"

 

What am I doing wrong? 

 

Parents
No Data
Reply
  • 44743
    posted

    It is possible the tool being passed into the event args of the event is not the same tool you are looking at to check the text. If not, the text is correctly not updating, because you are setting the Caption on the InstanceProps, which only apply to one instance of a tool. If you want the caption to change for all tools with the same type and key, set the Caption on the SharedProps. If you are sure the tool instance passed into the event is the correct one you want to update the caption on (you can determine this by checking the tool's Owner), then it is probably a bug and I would recommend submitting it to the support group: http://ko.infragistics.com/gethelp

Children
No Data