Solved

How to handle taborder with an SSTab object.

Posted on 2001-08-10
4
264 Views
Last Modified: 2008-03-10
I have a form that has an SSTab object on it.  When I set the taborder for all of the objects, the form includes all of the tabs. So when you get to the last visible object, and hit tab, the cursor disappers. It comes back after you tab through all of the other tabstops.

I guess the best solution would be if I could make the SStab move to the tab visible if one of the fields was tabbed to (lots of tab words, sorry).

I know I could simply make all of them not be tabstops. I don't like this solution because when the user switches tabs, you want the tab key to work.

Thoughts, or just to confusing a question?
0
Comment
Question by:jnhgustin
4 Comments
 
LVL 5

Expert Comment

by:KDivad
ID: 6375066
The closest I've ever been able to do is to set up your taborder as though you were going to let the user tab through every control on the form and then make the controls you want out of the order be disabled or hidden.
0
 
LVL 39

Expert Comment

by:appari
ID: 6375148
you can keep all the controls going on to one tab in to a frame and keep the frame on the respective tab and on tab change disable all other frames and enable the frame to be displayed on current tab.

0
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6375246
appari is correct.  By disabling the frames not in use, you disable all of the controls within those frames...  The tabbing has to stay with the enabled controls on the current tab
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 100 total points
ID: 6375278
What I do in such situation to get the focus to the invisible control, is to set the SStab's tab property in the first and last control in the particular tab, something like this:

Say, SSTab1, Tab 1 has TextFirst as first control and TextLast as last control. Now, if the user presses TAB from previous tab's last control, then the focus will be to TextFirst and it will be visible. Similarly, if there is another Tab after Tab 1, and if user presses SHIFT+TAB from that control, then the focus will be shifted properly.

Private Sub TextFirst_GotFocus()
  if SSTab1.Tab <> 1 Then
      SSTab1.Tab = 1
  End If
End Sub

Private Sub TextLast_GotFocus()
  if SSTab1.Tab <> 1 Then
      SSTab1.Tab = 1
  End If
End Sub

I am not sure, if this is what you require.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now