Completed
Last Updated: 13 Nov 2015 08:58 by ADMIN
ADMIN
George
Created on: 02 May 2014 12:09
Category: RibbonBar
Type: Bug Report
4
FIX. RadRibbonBar - pressing the alt key takes away the focus from the other controls
To reproduce:

Add a RadRibbonBar to a Form. Add a RadTextBox to the bottom of the Form. Start the application, click the textbox and press the alt key. You will see that the focus will be taken away. This does not allow you to input key combinations into RadTextBox, such as Alt + 457.


Workaround:

Use the following custom RadRibbonBar:

public class MyRadRibbonBar : RadRibbonBar
{
    protected override ComponentInputBehavior CreateBehavior()
    {
        return new MyRibbonBarInputBehavior(this);
    }


    public override string ThemeClassName
    {
        get
        {
            return typeof(RadRibbonBar).FullName;
        }
        set
        {
        }
    }
}


class MyRibbonBarInputBehavior : RadRibbonBar.RibbonBarInputBehavior
{
    public MyRibbonBarInputBehavior(RadRibbonBar owner)
        : base(owner)
    {
    }


    protected override bool SetInternalKeyMapFocus()
    {
        if ((this.Owner as RadRibbonBar).ContainsFocus)
        {
            return base.SetInternalKeyMapFocus();
        }


        return false;
    }
}
0 comments