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

tabstop not working

15 Answers 576 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Hans
Top achievements
Rank 1
Hans asked on 07 Nov 2013, 10:34 AM
I have Q3 controls.  There is no tabstop property in my design properties window for raddropdownlist. And setting is programmatically to false does not work. What can I do?

15 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 12 Nov 2013, 09:09 AM
Hi Hans,

Thank you for contacting Telerik Support.

We already have this issue logged in our Public Issue Tracking System, you can find it on the following address - http://www.telerik.com/support/pits.aspx#/details/Issue=16073 where you can vote/comment or subscribe for changes.

As a workaround you can set the TabStop property of the hosted TextBoxControl:
this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.TabStop = false;

I hope this helps.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Blair
Top achievements
Rank 1
answered on 13 Jun 2014, 07:05 PM
We are using WinForms release 2014.1.402.40.

Your above solution works when DropDownStyle = RadDropDownStyle.DropDown

However it does not work when DropDownStyle = RadDropDownStyle.DropDownList

Can you please provide the workaround line for when the DropDownStyle = RadDropDownStyle.DropDownList

Thanks.
0
George
Telerik team
answered on 18 Jun 2014, 01:16 PM
Hi Blair,

Thank you for writing.

You do not need a workaround in the case where the DropDownStyle is set to DropDownList. You can simply set the TabStop property to the RadDropDownList:
ddlist.DropDownStyle = RadDropDownStyle.DropDownList;
ddlist.TabStop = false;

Let me know, if you have further questions.

Regards,
George
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Martin
Top achievements
Rank 1
answered on 15 Apr 2015, 03:36 PM

George,

 I am currently using the WinForms release 2015.1.331.40. 

Frorm your  previous posted example it is defaulting to True which is what  I was expecting this.radDropDownList1.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.TabStop

But I want to be able to set the tab stop to true but when I try to set the TabStop = True, it never changes from False to true

Here is my code example

RadDropDownList ddl = new RadDropDownList();
ddl.Name = fld.Name;
ddl.Tag = fld.UniqueName;
ddl.Dock = DockStyle.None;
ddl.Width = 350;
ddl.NullText = fld.Alias;
ddl.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
ddl.DropDownStyle = RadDropDownStyle.DropDown;
ddl.TabStop = true;  // Always stays false, never changes to true

I can use the workaround for now, but I will need to possibly use the DropDownList style in the future and the TabStop is functioning the same way.

Thanks,

Martin

 

0
Dimitar
Telerik team
answered on 20 Apr 2015, 11:01 AM
Hello Hans,

Thank you for writing back.

Yes, this property value is hard-coded to false. The case here is that our editors (RadDropDownList, RadDateTimePicker, RadTimePicker and RadMaskedEditBox) internally host the standard MS TextBox control. So, in order to allow the inner text box control to get the focus, we have hardcoded the control TabStop property to false, so the inner control will accept the focus (and you will be able to type in after pressing tab). At the same time, the DefaultValue attribute of the TabStop property is true, so when we hard coded it to false, once you opened a form designer containing these controls, their TabStop property will get serialized to false and you will not be able to change that. However, in general, you shouldn't need to change that by default, as the focus will be given to the inner control as it should. If you want to disable the TabStop you can set it to false in code (this will set the TabStop of the internal textbox):
radDropDownList1.TabStop = false;

I hope this information helps. 

Regards,
Dimitar
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Michael
Top achievements
Rank 1
answered on 05 Apr 2016, 10:25 AM

Hello Dimitar...

I have tried to encapsulate the radDropDownList class into MyDDLClass, then shadow the TabStop property so the getter and setter method makes use of Me.DropDownListElement.EditableElement.TextBox.TextBoxItem.TextBoxControl.TabStop

but it still won't work even though i set this to true in the designer. The only way I can make it work, is by removing my property and by code set the property to true manually....

0
hans
Top achievements
Rank 1
answered on 05 Apr 2016, 11:51 AM

This is my derived class with tabstop working

public abstract class QComboBoxBase : RadDropDownList
{
protected QComboBoxBase()
{
// zet dropdownlist gedrag
DropDownStyle = RadDropDownStyle.DropDown;
AutoCompleteMode = AutoCompleteMode.SuggestAppend;
DropDownListElement.AutoCompleteAppend.LimitToList = true;
DropDownListElement.TextBox.TextBoxItem.TextBoxControl.TabStop = true;

if (LicenseManager.UsageMode != LicenseUsageMode.Designtime)
{
QLoadData();
}
}

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

protected override void OnLoad(Size desiredSize)
{
base.OnLoad(desiredSize);
}

//protected override void InitLayout()
//{
// base.InitLayout();
// if (!IsDesignMode)
// {
// QLoadData();
// }
//}

protected abstract void QLoadData();
}

0
Michael
Top achievements
Rank 1
answered on 05 Apr 2016, 12:14 PM

Yes, and this does not work for me. My class looks like this (It is vb.NET, but I hope you will manage):

Public Sub New()
        MyBase.New()
Me.DropDownListElement.EditableElement.TextBox.TextBoxItem.TextBoxControl.TabStop = True

End Sub

Public Shadows Property TabStop As Boolean
        Get
               
            Return Me.DropDownListElement.EditableElement.TextBox.TextBoxItem.TextBoxControl.TabStop
        End Get
        Set(value As Boolean)
Me.DropDownListElement.EditableElement.TextBox.TextBoxItem.TextBoxControl.TabStop = value
        End Set
    End Property

 

 

 

 

The property was to make it accessible through the designer, but none of this works...

0
hans
Top achievements
Rank 1
answered on 05 Apr 2016, 12:17 PM

This is not exactly the same.

DropDownListElement.TextBox.TextBoxItem.TextBoxControl.TabStop = true;

I do not have 'EditableElement' in my line

0
Michael
Top achievements
Rank 1
answered on 05 Apr 2016, 12:33 PM

You are correct...

Changed my code and it still doesn't work. I can set it to true in the designer, but when I clean and rebuild, the value is reset to false... So still no luck unfortunately

0
hans
Top achievements
Rank 1
answered on 05 Apr 2016, 12:36 PM
I do not use a shadow property.  Does that make a difference ?
0
Dimitar
Telerik team
answered on 05 Apr 2016, 12:50 PM
Hi Marcus,

Thank you for writing.

The class should look like this:
Friend Class MyRadDropDwonList
    Inherits RadDropDownList
 
    Public Sub New()
        Me.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown
        Me.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.TabStop = True
    End Sub
    Public Shadows Property TabStop() As Boolean
        Get
            Return Me.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.TabStop
        End Get
        Set(ByVal value As Boolean)
            Me.DropDownListElement.TextBox.TextBoxItem.TextBoxControl.TabStop = value
        End Set
    End Property
End Class

The important part is that the drop down style must be set before the TabStop, setting it after that will reset the TabStop.

Let me know if you have additional questions.

Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Michael
Top achievements
Rank 1
answered on 05 Apr 2016, 01:01 PM

First of all, hans, thanks for your help

Thanks Dimitar. That was what was doing it. Is there any way I could have known this by looking in the documentation or anything? Sometimes these underlaying resets of properties can really pull some hair out :)

 

Regards Michael

0
Dimitar
Telerik team
answered on 06 Apr 2016, 06:32 AM
Hi Michael,

Thank you for writing back.

I agree with you, and I believe that setting the drop down style should not reset the TabStop. This is why I have logged this case in our Feedback Portal. This will allow our developers to fully investigate this and determine why this reset is necessary. You can track the item for status changes and add your vote for it here.

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

Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
answered on 22 Nov 2022, 06:06 PM
I know this is 6 years later, but why is the property hidden from the property page?  
Dinko | Tech Support Engineer
Telerik team
commented on 23 Nov 2022, 09:41 AM

Thank you for writing.

May I ask you to share which property page are you referencing so that I can take a closer look?

Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
commented on 23 Nov 2022, 12:24 PM

Missing TabStop from the Designer Property page

 

Dinko | Tech Support Engineer
Telerik team
commented on 24 Nov 2022, 12:14 PM

Thank you for elaborating on your question.

As my colleague, Dimitar mentioned in one of his previous replies, the RadDropDownList control internally hosts the MS TextBox. The RadDropDownList control should not capture the focus but the inner MS TextBox control should. That is why this property was hidden from the property's window.

Tags
DropDownList
Asked by
Hans
Top achievements
Rank 1
Answers by
George
Telerik team
Blair
Top achievements
Rank 1
Martin
Top achievements
Rank 1
Dimitar
Telerik team
Michael
Top achievements
Rank 1
hans
Top achievements
Rank 1
Mark
Top achievements
Rank 2
Bronze
Bronze
Veteran
Share this question
or