HostedControl of a radlabel

3 posts, 1 answers
  1. Ryan
    Ryan avatar
    25 posts
    Member since:
    Jul 2008

    Posted 21 Aug 2008 Link to this post

    How do I change (in VB.Net) the properties of the hosted control a radlabel?

    What I'm trying to do is set the UseMnemonic property to false.

    Ryan
  2. Answer
    Angel
    Admin
    Angel avatar
    121 posts

    Posted 22 Aug 2008 Link to this post

    Hello Ryan,

    It seems that the UseMnemonic property was not linked to the text primitive inside the label.
    Thank you for notifying us, your points have been updated.

    The issue is now addressed and the fix will be available in the upcoming Service Pack (due next week).
    If you do not wish to upgrade to the latest version, you have to set UseMnemonic both to the control and to the text primitive inside the control. The last can be done both in design-time and with code:

    Design-time:
    Choose "Edit UI elements" from the action list;
    In the dialog that pops up select the TextPrimitive and set its UseMnemonic property. See the attached picture for more information.

    Code:
    TextPrimitive text = (TextPrimitive)this.radLabel1.LabelElement.Children[2].Children[1];  
    text.UseMnemonic = false

    Don't hesitate to contact us if you have other questions.

    Kind regards,
    Angel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ryan
    Ryan avatar
    25 posts
    Member since:
    Jul 2008

    Posted 22 Aug 2008 Link to this post

    Thank you for this answer.

    For others who deal with same issue, note that the textprimitive is found here:

    Telerik.WinControls.Primitives.TextPrimitive

Back to Top