locked
C# Window label Text RRS feed

  • Question

  •  

    Dear all,

     

    I create a Win form and i insert "R&D" into the label text, but what it display is RD .How can i show out the R&D in the label.

     

    Thank you

    Tuesday, January 8, 2008 10:46 AM

Answers

  • Hi,

     

    Alternatively you can set the label's UseMnemonic property to false. This will disable the feature which is causing the string R&D to turn into RD.

     

    This would be useful if you are databinding the label and the actual text is comming from a database for example (i.e. those cases where you don't want to modify the string you store).

     

    Hope this helps,

    Christopher Fairbairn

     

    Tuesday, January 8, 2008 11:55 PM

All replies

  • Hi Carrie17,

    Use next code snippet:
    label1.Text = "R&&D";

    Regards,
    Oleh.
    Tuesday, January 8, 2008 11:54 AM
  • Thank you

     

    Tuesday, January 8, 2008 11:43 PM
  • Hi,

     

    Alternatively you can set the label's UseMnemonic property to false. This will disable the feature which is causing the string R&D to turn into RD.

     

    This would be useful if you are databinding the label and the actual text is comming from a database for example (i.e. those cases where you don't want to modify the string you store).

     

    Hope this helps,

    Christopher Fairbairn

     

    Tuesday, January 8, 2008 11:55 PM