Allow Ctrl+Tab Default Behavior

6 posts, 0 answers
  1. Robert
    Robert avatar
    14 posts
    Member since:
    Dec 2015

    Posted 19 Sep Link to this post

    Hello,

    I have a RadDock window with a number of buttons and textboxes. Normally these controls can be tabbed through using just the tab key and that works fine. But if the textboxes have AcceptTab = True then the normal windows behavior is that when the textbox has the focus tabbing occurs within the textbox. Tabbing to the next control requires Ctrl+Tab. However, in a RadDock scenario, Ctrl+Tab opens the Quick Navigation dialog. I can disable QuickNavigation (QuickNavigatorSettings.Enabled = False) but apparently the Ctrl+Tab combination is still captured by RadDock and does nothing. I would like to somehow allow the Ctrl+Tab combination to pass through to windows default behavior.

    This was covered back in 2007 to some extent (http://www.telerik.com/forums/customize-ctrl-tab-feature) but I thought there might some changes that would allow for a solution other than adding a messagefilter since some of the information in that post no longer applies, i.e., dockingManager.UseQuickNavigator no longer seems to exist. If a messagefilter is still required what would that look like in vb.net that would allow normal default behavior.

    Best regards,

    Robert

     

     

  2. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 20 Sep Link to this post

    Hi Robert,

    I have tested this and I can confirm that it does not behave as expected. I have logged this issue in our Feedback Portal. You can track its progress, subscribe for status changes and add your comment to it here. I have also updated your Telerik Points.

    Unfortunately, due to the nature of the issue, I cannot suggest a workaround for it. 

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 20 Sep Link to this post

    Hello, Robert,

    I have further investigated this and found a workaround that can be used. Instead of handling this in RadDock you can use the PreviewKeyDown event of the textboxes:
    // RadTextBox
    private void TextBoxItem_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
    {
        if ((e.KeyData & Keys.Tab) == Keys.Tab && (e.KeyData & Keys.Control) == Keys.Control)
        {
            e.IsInputKey = true;
            var item = sender as RadTextBoxItem;
      
            this.SelectNextControl(item.HostedControl, true, true, true, true);
      
        }
    }
    //RadTextBoxControl
    private void RadTextBoxControl1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
    {
        if ((e.KeyData & Keys.Tab) == Keys.Tab && (e.KeyData & Keys.Control) == Keys.Control)
        {
            e.IsInputKey = true;
            this.SelectNextControl(sender as RadTextBoxControl, true, true, true, true);
      
        }
    }

    I hope this will be useful. 

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Robert
    Robert avatar
    14 posts
    Member since:
    Dec 2015

    Posted 21 Sep in reply to Dimitar Link to this post

    I can't get the workaround to actually work. It appears that the combination of Ctrl+Tab never hits the PreviewKeyDown event. Ctrl by itself does. Tab by itself does. But not when combined. Shift+Tab does work as a combination. 

    I have also noticed that there is a strange animated circle effect that appears briefly when the Ctrl key is pressed. Is there another setting that I should look at besides QuickNavigatorSettings.Enabled = False.

  5. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 25 Sep Link to this post

    Hi Robert,

    I forgot to add the following line. After unregistering the command the events should be fired:
    this.radDock1.CommandManager.UnregisterCommand("DisplayQuickNavigator");

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. Robert
    Robert avatar
    14 posts
    Member since:
    Dec 2015

    Posted 25 Sep in reply to Dimitar Link to this post

    Yes, that was the bit that was missing. Works well now. 

    Thanks.

     

Back to Top