How to disable alt key

4 posts, 0 answers
  1. JANG KYUNG SEOC
    JANG KYUNG SEOC avatar
    6 posts
    Member since:
    Nov 2008

    Posted 19 Nov 2009 Link to this post

    I got this code for disable alt key on the radribbonbar.

    SetProperty(Me.RadRibbonBar1, "EnableKeyTips", False)

        Public Sub SetProperty(ByVal obj As Object, ByVal propertyName As String, ByVal val As Object)
            Dim t As System.Type = GetType(Telerik.WinControls.UI.RadRibbonBar)
            Dim flags As System.Reflection.BindingFlags = System.Reflection.BindingFlags.Instance Or     System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.[Public]
            Dim pi As System.Reflection.PropertyInfo = t.GetProperty(propertyName, flags)
            val = Convert.ChangeType(val, pi.PropertyType)
            pi.SetValue(obj, val, Nothing)
        End Sub

    However I got the error message "NullReferenceException".

    I use VB2005, and I want to disable Alt hot key.

    Do I have any idea??
  2. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 20 Nov 2009 Link to this post

    Hello JANG KYUNG SEOC,

    The property that you need is EnableKeyMap and it is public, so you can set it programmatically as shown below:
    Me.RadRibbonBar1.EnableKeyMap = False

    If you have additional questions, feel free to contact me.

    Best wishes,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Marcello
    Marcello avatar
    8 posts
    Member since:
    Dec 2008

    Posted 11 Dec 2009 Link to this post

    Hi,
    setting it programatically it works fine but setting it through the property windows it does not take effect

    Thanks
    Marcello
  5. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 17 Dec 2009 Link to this post

    Hello Marcello,

    Thank you for your feedback.

    This is a known issue and it will be addressed in one of our next versions. For the time being, please set the property programmatically.

    Regards,

    Nikolay
    the Telerik team

     


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top