Label on MS Tabbed Dialog control prevents validate event firing when changing tabs 
Author Message
 Label on MS Tabbed Dialog control prevents validate event firing when changing tabs

Hi people,

Just wondering if anyone can confirm the following is a known issue, by
design or otherwise.

Consider a form containing the MS Tabbed Dialog (SSTab) control, on the
first tab place a Textbox and a Label.  The CausesValidation property is set
to True for both the SSTab and Textbox.

If run this application and I change the text in Text1 I find the
Text1_Validate event does not fire when the SSTab control is clicked to
change to another tab.  However if  I remove the Label and repeat the
process, the Text1_Validate event does fire as expected.

Does anyone know why the Label on SSTab breaks the validation?

I am using VB6 SP4 on Win2K SP1.  I have verified the problem with VB6 SP5
as well.  Below is the Form and Project.

Any help much appreciated.

Thanks,
Allan.

' Form1.frm
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "tabctl32.ocx"
Begin VB.Form Form1
   Caption         =   "Form1"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin TabDlg.SSTab SSTab1
      Height          =   1335
      Left            =   780
      TabIndex        =   0
      Top             =   840
      Width           =   3075
      _ExtentX        =   5424
      _ExtentY        =   2355
      _Version        =   393216
      TabHeight       =   520
      TabCaption(0)   =   "Tab 0"
      TabPicture(0)   =   "Form1.frx":0000
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).Control(0)=   "Label1"
      Tab(0).Control(0).Enabled=   0   'False
      Tab(0).Control(1)=   "Text1"
      Tab(0).Control(1).Enabled=   0   'False
      Tab(0).ControlCount=   2
      TabCaption(1)   =   "Tab 1"
      TabPicture(1)   =   "Form1.frx":001C
      Tab(1).ControlEnabled=   0   'False
      Tab(1).ControlCount=   0
      TabCaption(2)   =   "Tab 2"
      Tab(2).ControlEnabled=   0   'False
      Tab(2).ControlCount=   0
      Begin VB.TextBox Text1
         Height          =   375
         Left            =   180
         TabIndex        =   1
         Text            =   "Text1"
         Top             =   660
         Width           =   915
      End
      Begin VB.Label Label1
         Caption         =   "Label1"
         Height          =   315
         Left            =   1740
         TabIndex        =   2
         Top             =   660
         Width           =   1155
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Text1_Validate(Cancel As Boolean)

   MsgBox "validate for Text1 fired"

End Sub

' Project.vbp
Type=Exe
Form=Form1.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\WINNT\sys
tem32\STDOLE2.TLB#OLE Automation
Object={BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0; tabctl32.ocx
IconForm="Form1"
Startup="Form1"
Command32=""
Name="Project1"
HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=0
AutoIncrementVer=0
ServerSupportFiles=0
CompilationType=0
OptimizationType=0
FavorPentiumPro(tm)=0
CodeViewDebugInfo=0
NoAliasing=0
BoundsCheck=0
OverflowCheck=0
FlPointCheck=0
FDIVCheck=0
UnroundedFP=0
StartMode=0
Unattended=0
Retained=0
ThreadPerObject=0
MaxNumberOfThreads=1

[MS Transaction Server]
AutoRefresh=1



Sun, 26 Oct 2003 11:30:05 GMT  
 Label on MS Tabbed Dialog control prevents validate event firing when changing tabs
Shipped with VB come two Tab controls: one from Microsoft (TabStrip), one
from Sheridan (SSTab). Because of the many bugs of the SSTab, I decided to
always use the TabStrip, developped according to MS GUI standards, gone
through MS test procedures, although it has rudimentary functions. But what
is the use of the SSTab functions if anyway for them to be properly
implemented, I need to program a lot of glue and then still with not 100
percent bug free?


Sun, 26 Oct 2003 15:01:49 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Problem with tooltips, labels and the MS Tabbed Dialog control

2. Problem with tooltips, labels and the MS Tabbed Dialog control

3. Sending a TAB key through API not firing Validate Event

4. Form's validate does not fire usercontrol(inside textbox) validating event

5. textbox validate event not being fired when sstab controls gets focus

6. VB5 / MS-Winsock control: event firing bug?

7. Treeview AfterSelect firing before TextBox Validating event

8. ESC still fires Validating events but clicking the Cancel button does not

9. Textbox validating event fires when closing a form.

10. Validate Event Not Firing

11. VB6 ActiveX Control -- Change Event Not Firing

12. Validate Events does not fire in usercontrol

 

 
Powered by phpBB® Forum Software