Does Telerik Label suppurt "&" sign

4 posts, 0 answers
  1. Haroon
    Haroon avatar
    38 posts
    Member since:
    Dec 2007

    Posted 21 Sep 2008 Link to this post

    Hi Telerik Team,
    I being trying to write some text (i.e. "A&&B") so that it should the displayed as "A&B" . The problem I am facing is that if I use "&&" between the displayed text is "A..." like and if I use "A&B" the displayed text would be "AB" (Second one is OK as its standard behaviour).

    Can you please  help me that how can I display "A&B" text in Telerik Label.

    Regards,
    Haroon.
  2. John
    John avatar
    30 posts
    Member since:
    Aug 2008

    Posted 22 Sep 2008 Link to this post

    Haroon,
         You can change the UseMneumonic property to False which will allow you to display A&B in the label.  This will turn off the "A..." and "AB" behavior that you are seeing currently.

    Hope this helps,
    John Kellar
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Haroon
    Haroon avatar
    38 posts
    Member since:
    Dec 2007

    Posted 22 Sep 2008 Link to this post

    Hi John,
    Thanks for the help.
    The same thing happens with RadMenuItem and  there is no "UseMnemonic" property in case of RadMenu (Infact I have added the Menu Items in RadSpiultButton) can you please help me in this regard.

    Regards,
    Haroon.
  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 25 Sep 2008 Link to this post

    Hello Haroon,

    Thank you for the additional feedback.

    We have investigated the problems and found a problem in the TextPrimitive element (it is responsible for text drawing).

    Basically, the problem lies in the fact that the TextPrimitive in RadLabel reports a smaller size than needed when & is used. Because of this, the text is displayed with "..." if the text is longer than the size of the label. If you type some letters after the & sign, you should be able to see it (e.g. "Test&& 123"). There are two workarounds to this issue until we fix it:
    1. You can place some spaces at the end of the text. This will enlarge the size of the text and the ampersand will become visible.
    2. You can use the "Edit UI Elements" menu form the smart tag to set the TextPrimitive.MinSize.Width property to a larger value. This will cause the same effect as the first solution. You should also set the AutoSize property to false and resize the label element manually. A more descriptive screenshot of the first part is attached.
    Please, note that we do not support a way to enable/disable mnemonics in RadMenu. We will consider adding such.

    The issues are now logged in our system and we will fix them as soon as possible.


    Best wishes,
    Boyko Markov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top