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

mnemonics in tab control

14 Answers 169 Views
Tabstrip (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
nilesh
Top achievements
Rank 1
nilesh asked on 22 Jul 2009, 11:42 AM
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.

14 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 23 Jul 2009, 12:45 PM
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.
0
NORIS
Top achievements
Rank 1
answered on 04 Nov 2009, 06:16 PM
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.

 

0
Boyko Markov
Telerik team
answered on 05 Nov 2009, 03:51 PM
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.
0
NORIS
Top achievements
Rank 1
answered on 19 Nov 2009, 03:01 PM
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.
0
Boyko Markov
Telerik team
answered on 24 Nov 2009, 02:45 PM
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.
0
NORIS
Top achievements
Rank 1
answered on 24 Nov 2009, 08:28 PM
Would you please provide this in VB?
Thanks.
0
NORIS
Top achievements
Rank 1
answered on 25 Nov 2009, 12:54 PM
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.
0
Boyko Markov
Telerik team
answered on 26 Nov 2009, 02:06 PM
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.
0
NORIS
Top achievements
Rank 1
answered on 30 Nov 2009, 02:44 PM
I have not used ProcessCmdKey before.  Could you provide a VB example?
Do you know when this feature will be supported?
Thank you.
0
Boyko Markov
Telerik team
answered on 01 Dec 2009, 07:30 AM
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.
0
NORIS
Top achievements
Rank 1
answered on 01 Dec 2009, 04:44 PM
Beautiful!  That works perfectly!
I did have to remove the DirectCast, because it would not convert to Integer.
Thanks so much!
0
Boyko Markov
Telerik team
answered on 03 Dec 2009, 08:52 AM
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.
0
NORIS
Top achievements
Rank 1
answered on 25 Feb 2010, 02:47 PM
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

0
Boyko Markov
Telerik team
answered on 03 Mar 2010, 07:38 AM
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.
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
nilesh
Top achievements
Rank 1
Answers by
Nick
Telerik team
NORIS
Top achievements
Rank 1
Boyko Markov
Telerik team
Share this question
or