tabstop not working

15 posts, 0 answers
  1. Hans
    Hans avatar
    14 posts
    Member since:
    Nov 2010

    Posted 07 Nov 2013 Link to this post

    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?
  2. George
    Admin
    George avatar
    500 posts

    Posted 12 Nov 2013 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Blair
    Blair avatar
    3 posts
    Member since:
    May 2011

    Posted 13 Jun 2014 in reply to George Link to this post

    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.
  5. George
    Admin
    George avatar
    500 posts

    Posted 18 Jun 2014 Link to this post

    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.
     
  6. Martin
    Martin avatar
    2 posts
    Member since:
    Jun 2012

    Posted 15 Apr 2015 in reply to George Link to this post

    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

     

  7. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 20 Apr 2015 Link to this post

    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.

     
  8. Michael
    Michael avatar
    4 posts
    Member since:
    Oct 2014

    Posted 05 Apr in reply to Dimitar Link to this post

    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....

  9. hans
    hans avatar
    6 posts
    Member since:
    Aug 2006

    Posted 05 Apr in reply to Michael Link to this post

    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();
    }

  10. Michael
    Michael avatar
    4 posts
    Member since:
    Oct 2014

    Posted 05 Apr in reply to hans Link to this post

    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...

  11. hans
    hans avatar
    6 posts
    Member since:
    Aug 2006

    Posted 05 Apr in reply to Michael Link to this post

    This is not exactly the same.

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

    I do not have 'EditableElement' in my line

  12. Michael
    Michael avatar
    4 posts
    Member since:
    Oct 2014

    Posted 05 Apr in reply to hans Link to this post

    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

  13. hans
    hans avatar
    6 posts
    Member since:
    Aug 2006

    Posted 05 Apr Link to this post

    I do not use a shadow property.  Does that make a difference ?
  14. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 05 Apr Link to this post

    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.
  15. Michael
    Michael avatar
    4 posts
    Member since:
    Oct 2014

    Posted 05 Apr in reply to Dimitar Link to this post

    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

  16. Dimitar
    Admin
    Dimitar avatar
    1414 posts

    Posted 06 Apr Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready