Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Combo Boxes on a SSTab 1

Status
Not open for further replies.

campbere

Technical User
Oct 10, 2000
146
US
I am having problems with a few of my combo boxes on a SSTab. I have two tabs. General Information, and Comments.

The General Information is displayed first and has combo boxes on it. They are loaded when the form is loaded.

The Comments section has some text boxes on it.

When I click on the Comments section and then back to the General Information tab I have this funny blue highlight on my combo box values. It isn't the backcolor of the combo box because I have tried changing. I have tried many different ways but I still can't get rid of this highlight.

Can someone help?
 
I think the problem occurs with xp.

On the event: SS_Tab_Click

Add this code for your combo boxes:

ComboBoxName.SelLength = 0

This seems to take care of the problem.
 
Your combo box has received the focus naturally and will naturally have the selection highlight there.
If you have another control on your visible tab area like a text box, you can change the taborder so it is before the combo box and it will get the focus instead.
You can also set its property so it never gets the tab.
The Highlite is useful because if you had Bill showing and you want it to seek the name by entering just the first letter or so (T selects the first person starting with T)all you have to do it type T and it will clear the name already in the box and find Ted (otherwise you get BillT)
 
Just thought I'd share a few things that I have learned about using SSTab controls. (By the way, I like SSTab.)

If you use source code control (such as Visual SourceSafe) and your copy of a form with an SSTab control on it is read only (because you don't have it checked out), you will not be able to switch tabs when you run your app interactively in VB. That is because SSTab makes the .left property of the controls on the tabs that are not showing negative to keep them from displaying. It can't change those properties when your form is read only so it can't change tabs. Nothing is really wrong and it won't affect a compiled app. It just won't let you change tabs interactively.

Also, SSTab will allow your user to tab to controls which are enabled on other tabs, but which are not showing on the screen because they are not on the current tab. This can be overcome, but it is a little complicated. BlackburnKL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top