This is a migrated thread and some comments may be shown as answers.

Allow Ctrl+Tab Default Behavior

5 Answers 227 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Iron
Robert asked on 19 Sep 2017, 12:17 PM

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

 

 

5 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 20 Sep 2017, 11:28 AM
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.
0
Dimitar
Telerik team
answered on 20 Sep 2017, 12:39 PM
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.
0
Robert
Top achievements
Rank 1
Iron
answered on 21 Sep 2017, 05:15 PM

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.

0
Dimitar
Telerik team
answered on 25 Sep 2017, 10:50 AM
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.
0
Robert
Top achievements
Rank 1
Iron
answered on 25 Sep 2017, 09:18 PM

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

Thanks.

 

Tags
Dock
Asked by
Robert
Top achievements
Rank 1
Iron
Answers by
Dimitar
Telerik team
Robert
Top achievements
Rank 1
Iron
Share this question
or