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

Strange behavior with TabIndex

3 Answers 137 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Schokoolero50
Top achievements
Rank 1
Schokoolero50 asked on 21 Mar 2011, 08:24 AM

Hello,

I had some troubles with the behavior of the RadTabControl with 2010 Q3. This has improved with 2011 Q1, or maybe I just got better at handling the Telerik controls. But it still behaves strangely when I set the TabIndex of the controls within the TabItems.

<Window x:Class="WPFApplication1.MainWindow"
        Title="Window1">
        <StackPanel>
        <telerik:RadMaskedTextBox MaskType="None" MaskedText="Text1" IsTabStop="True" TabIndex="1" />
        <telerik:RadTabControl>
            <telerik:RadTabItem Header="Header 1" IsTabStop="True" TabIndex="2" IsSelected="True">
                <StackPanel>
                    <telerik:RadMaskedTextBox MaskType="None" MaskedText="Text2" IsTabStop="True" TabIndex="3" />
                    <telerik:RadMaskedTextBox MaskType="None" MaskedText="Text3" IsTabStop="True" TabIndex="4" />
                </StackPanel>
            </telerik:RadTabItem>
            <telerik:RadTabItem Header="Header 2" IsTabStop="True" TabIndex="5">
                <StackPanel>
                    <telerik:RadMaskedTextBox MaskType="None" MaskedText="Text4" IsTabStop="True" TabIndex="6" />
                    <telerik:RadMaskedTextBox MaskType="None" MaskedText="Text5" IsTabStop="True" TabIndex="7" />
                </StackPanel>
            </telerik:RadTabItem>
        </telerik:RadTabControl>
    </StackPanel>
</Window>
In the small example above the focus moves from the TextBox with "Text1" to that with "Text2" then to the one with "Text3" and only then to the TabItem with "Header 1", although that has a lower TabIndex and should come first. If I remove the TabIndex property from the controls within the TabItems the behavior is as expected and the focus is on the header before it is on "Text2".

In this simple example it doesn't really matter of course, the TabIndex property is not needed for correct movement within the TabItems. In all the cases I can think of right now the position of the control within the xaml code should be sufficient to ensure the right order. There may however be some situation requiring TabIndices and then they should work correctly.

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 24 Mar 2011, 10:46 AM
Hello Schokoolero50,

The RadTabControl doesn't work as expected in such situations. We logged this issue in our PITS (TabControl: Setting TabIndex on a controls in the tabItem`s content doesn't work as expected) where you will be able to view its status and vote for. We also updated your telerik points. Thank you for your cooperation.

Greetings,
Petar Mladenov
the Telerik team
0
Schokoolero50
Top achievements
Rank 1
answered on 28 Mar 2011, 01:26 PM
Hello Petar,

I couldn't find the PITS entry last week, but now I found it and voted for it.
As for the Telerik points, my account still tells me that I have 0 of them.
How long does it usually take until I can see the points in my account?

Greetings
Schokoolero50
0
Petar Mladenov
Telerik team
answered on 28 Mar 2011, 01:29 PM
Hello Schokoolero50,

I updated your telerik account points. Please excuse me for the delay.

Best wishes,
Petar Mladenov
the Telerik team
Tags
TabControl
Asked by
Schokoolero50
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Schokoolero50
Top achievements
Rank 1
Share this question
or