Hi,
I'm creating an WebEditor with the Ribbonbar in Vb.net.
My problem is, that always if I press Alt, the Ribbonbar
gots the focus. That's a big problem, because
the user can't write chars like "{" or "}", wich are
very important for writing Website ( for Example in PHP ).
Can I deactivate it, or is there any workaround?
4 Answers, 1 is accepted
The behavior observed is because of the RadRibbonBar Key Tips feature. In order to turn it off, please set the EnableKeyMap to false in the form's constructor:
public Form1() |
{ |
InitializeComponent(); |
this.radRibbonBar1.EnableKeyMap = false; |
} |
If you have additional questions, feel free to contact me.
Kind regards,
Nikolay
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
There is no "EnableKeyMap" property.
Maybe I've got an old Version, I got this from
Microsoft, the Version is Q4 2006.
Can I get an Update, if there is a newer version?
There is a newer version of RadRibbonBar. However, it is a part of our WinForms suite and we cannot isolate it. Therefore, I cannot provide you with the updated version.
Actually, this there is a property for enabling/disabling the key tips in your version as well, but you are not able to access it. Therefore, I made a workaround using the reflection approach which sets the value of the particular property:
public Form1() |
{ |
InitializeComponent(); |
SetProperty(this.radRibbonBar1, "EnableKeyTips", false); |
} |
public void SetProperty(object obj, string propertyName, object val) |
{ |
Type t = typeof(RadControl); |
BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public; |
System.Reflection.PropertyInfo pi = t.GetProperty(propertyName, flags); |
val = Convert.ChangeType(val, pi.PropertyType); |
pi.SetValue(obj, val, null); |
} |
I hope this helps. If you have additional questions, feel free to contact me.
Kind regards,
Nikolay
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
thx, it works.
For all, who look for the soloution in vb.net:
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