Changing the text of a label made in ribbon visual designer at runtime RRS feed

  • Question

  • Hi,

    I am facing a typical problem at work where i want to change the text of a button label created in Ribbon visual designer(not through XML) at run-time. I am displaying a login form on the click of a button present in the ribbon bar with label "Sign In". Whenever the user successfully signs in i want to change the text of the label to "Sign out". For some reason when i am trying to change the text within my login form(Window form) creating a instance of the ribbon form class, it is only assigning the values to the label which were previously available and completely ignoring the label text change code. 

    Is there a way around this? Any kind of help will be much appreciated -Thanks

    Tuesday, August 9, 2016 6:31 PM


  • Hi,

    >>change the text within my login form(Window form)


    If you want to change the button label at run time, you could use

    Globals.Ribbons.Ribbon1.button2.Label = "Sign out";

    For more information, see Accessing the Ribbon at Run Time

    • Marked as answer by KunalGupta05 Wednesday, August 10, 2016 7:02 AM
    Wednesday, August 10, 2016 5:24 AM

All replies