mnemonics in tab control

15 posts, 0 answers
  1. nilesh
    nilesh avatar
    2 posts
    Member since:
    Jun 2009

    Posted 22 Jul 2009 Link to this post

    Hi,
    I can see the mnemonics on the tab control. but it is not switching to the tab. Can any body help me?
    Example: there are two tabs : &General and &Settings
    if I am at General tab and press Alt+S key, still it is not switching to Settings tab.
  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 23 Jul 2009 Link to this post

    Hello nilesh,

    Thank you for contacting us. We are aware of this bug(lack of feature) and we will try to fix that in our next release. Do not hesitate to write me back if you have other questions. 

    Best wishes,
    Nick
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 04 Nov 2009 Link to this post

    I found a way around this.  It seems that it will work after the control is referenced.

    For the RadMenu, on the Form load I put:

     

    btnCreateRpt.Selected = True

     

    btnCreateRpt.Selected =

    False

     

    You should be able to use any of your menu items for these commands.

    For the RabTabStrip, to change tabs using the Alt Key, in the Tab click event I put:

     

    Private Sub TabJuv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabJuv.Click

     

    lastTabItem = TabJuv

    PersonTabStrip1.SelectedTab = TabJuv  

    'to make Alt key work

     

     

     

     

    End Sub

    Hope this helps.

     

  5. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 05 Nov 2009 Link to this post

    Hello NORIS,

    I am glad that you managed to find the appropriate workaround for the issue.We will consider to add this functionality in the RadTabStrip for one of the coming releases.

    Thank you for the question and the idea about  adding mnemonics support.
    Please do not hesitate to contact us again if you have more questions.


    Regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 19 Nov 2009 Link to this post

    I have upgraded to Q3 2009 and my workaround for this issue is no longer working.
    Is there some way I can get this to work again?
    This can be a make or break issue for us using this control.  Do you know when this feature will be supported?
    Thank you.
  7. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 24 Nov 2009 Link to this post

    Hi NORIS,

    Thank you for contacting us.

    I'm enclosing is a sample project  which you can use as a solution.

      In case you have questions that need to be clarified, please don’t hesitate to ask.






    Kind regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  8. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 24 Nov 2009 Link to this post

    Would you please provide this in VB?
    Thanks.
  9. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 25 Nov 2009 Link to this post

    I figured out the VB code.  It works when the TabStrip is active.  After anything on the ContentPanel is active it no longer works.  Is there another event that this code can be place so it will run when anywhere on the form?
    Thanks.
  10. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 26 Nov 2009 Link to this post

    Hi NORIS,

    I suggest you try to override your application form ProcessCmdKey method or use a message filters as a custom approach.

    Please contact us again if you have additional questions.

    Best wishes,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  11. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 30 Nov 2009 Link to this post

    I have not used ProcessCmdKey before.  Could you provide a VB example?
    Do you know when this feature will be supported?
    Thank you.
  12. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 01 Dec 2009 Link to this post

    Hello NORIS,

    I have found a better way to process mnemonics. You can override your form's ProcessMnemonics method and do the following:

    Protected Overloads Overrides Function ProcessMnemonic(charCode As Char) As Boolean
        If DirectCast(charCode, Integer) = "s"C Then
            tabStrip.SelectedTab = Me.tabStrip.Items(0)
        ElseIf DirectCast(charCode, Integer) = "g"C Then
            tabStrip.SelectedTab = Me.tabStrip.Items(1)
        End If

        Return MyBase.ProcessMnemonic(charCode)
    End Function

    In case you need more information, please feel free to contact us.



    Kind regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  13. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 01 Dec 2009 Link to this post

    Beautiful!  That works perfectly!
    I did have to remove the DirectCast, because it would not convert to Integer.
    Thanks so much!
  14. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 03 Dec 2009 Link to this post

    Hi NORIS,

    I am happy that my solution worked in your scenario. In case you need more assistance, please feel free to contact us.

    Regards,
    Boyko Markov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  15. NORIS
    NORIS avatar
    29 posts
    Member since:
    Jun 2009

    Posted 25 Feb 2010 Link to this post

    Hello again, Boyko.
    I am now using release 1-8-10 IB and I have found that this function you so kindly gave me no longer fires so keys such as page up/down and F Keys no longer work.  Do I need to use a different workaround or will this work in Q1 2010?
    Below is my function.
    Thanks again. 

     

     

     

    Protected Overloads Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean

     

     

     

    'controls navigation keys

     

     

     

    Dim baseResult As Boolean = MyBase.ProcessCmdKey(msg, keyData)

     

     

    Dim index As Integer = PersonTabStrip1.Items.IndexOf(DirectCast(PersonTabStrip1.SelectedTab, TabItem))

     

     

    Dim currentTab As TabItem = DirectCast(Me.PersonTabStrip1.Items(index), TabItem)

     

     

    'process tab key, go to next Tab is Strip is active, otherwise goes to next control

     

     

     

    If keyData = Keys.Tab AndAlso PersonTabStrip1.Focused Then

     

     

     

    'If isTabulatedByIndex = True Then

     

     

     

    TabByIndex()

     

     

    'Else

     

     

     

    ' TabByTag()

     

     

     

    'End If

     

     

     

    ElseIf keyData = Keys.PageDown Then 'PageDown, go to contentPanel

     

     

     

    currentTab.ContentPanel.Focus()

     

     

    ElseIf keyData = Keys.PageUp Then 'PageUp, go to tabStrip

     

     

     

    currentTab.Focus()

     

     

    ElseIf keyData = Keys.F8 Then

     

     

     

    MoveControlField("PREV")

     

     

    ElseIf keyData = Keys.F9 Then

     

     

     

    MoveControlField("NEXT")

     

     

    Return True

     

     

     

    End If

     

     

     

    Return baseResult

     

     

    End Function 'ProcessCmdKey

     

     

     

     

     

     

    Private Sub MoveControlField(ByVal Direction As String)

     

     

    'move to the next field in template controls with F8 and F9

     

     

     

    'Dim theCtrl As New Control

     

     

     

    If theControls.Count > 0 Then

     

     

     

    If Direction = "PREV" Then

     

     

     

    If CurrentControl = 0 Then

     

     

     

    CurrentControl = theControls.Count - 1

     

     

    Else

     

     

     

    CurrentControl = CurrentControl - 1

     

     

    End If

     

     

     

    ElseIf Direction = "NEXT" Then

     

     

     

    If CurrentControl = theControls.Count - 1 Then

     

     

     

    CurrentControl = 0

     

     

    Else

     

     

     

    CurrentControl = CurrentControl + 1

     

     

    End If

     

     

     

    End If

     

     

     

    'theCtrl = theControls.Item(CurrentControl)

     

     

     

    CurrentCtrl = theControls.Item(CurrentControl) 'set current control

     

     

     

    GotoTab(CurrentCtrl) 'set current tab

     

     

     

    CurrentCtrl.Focus() 'set focus

     

     

     

    'MsgBox("Current Control=" & CurrentCtrl.Name)

     

     

     

    End If

     

     

     

    End Sub 'MoveControlField

     

     

     


    BTW, this mnemonics on the TabStrip does still work using this Function:
    Protected Overloads Overrides Function ProcessMnemonic(ByVal charCode As Char) As Boolean

  16. Boyko Markov
    Admin
    Boyko Markov avatar
    610 posts

    Posted 03 Mar 2010 Link to this post

    Hello NORIS,

    I suggest you use ProcessMnemonic method instead of ProcessCmdKey. There was an issue with ProcessMnemonic method which we have already fixed for the internal build. Please feel free to contact us again in case you need more information.

    Greetings,
    Boyko Markov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for WinForms is Visual Studio 2017 Ready