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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another SSTab Bug

Status
Not open for further replies.

DrJavaJoe

Programmer
Oct 3, 2002
2,143
US
Start a new project and add an SSTab control, then a textbox to one of the tabs along with the following code. Now run the program and click between the textbox and a tab. You will see in the Immediate Window 'Validate Fired' and 'Tab Clicked' as expected. Now add a label control to the SSTab and try again, no more 'Validate Fired'.

Resolution that I found was to place all of the controls in a picturebox with the borderstyle set to none and place the picture box on the SSTab. Actually you only need to place the labels in a picturebox but who wants to do that?



Private Sub SSTab1_Click(PreviousTab As Integer)
Debug.Print "Tab Clicked"
End Sub
Private Sub Text1_Validate(Cancel As Boolean)
Debug.Print "Validate Fired"
End Sub


Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'.
 
The validate event is a pain anyway, because in order to get it to work you have to set the CausesValidation property of the NEXT control in the tab order to True. If you add any controls that change the tab order, it won't work as expected. I try not to bother with it.

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
It is not just labels that cause this problem I've just had exactly the same problem with a an ADODC control that was not contained in either a frame or picture box.

Thanks to this thread for helping me get this problem sorted.

And relax...........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top