************************************************** *-- Form: form1 (c:\dev\vdev\val\val5\demo.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 05/14/05 08:17:05 AM * DEFINE CLASS form1 AS form Caption = "Form1" Name = "Form1" ADD OBJECT pageframe1 AS pageframe WITH ; ErasePage = .T., ; PageCount = 2, ; Top = 13, ; Left = 14, ; Width = 359, ; Height = 239, ; Name = "Pageframe1", ; Page1.Caption = "Page1", ; Page1.Name = "Page1", ; Page2.Caption = "Page2", ; Page2.Name = "Page2" ADD OBJECT form1.pageframe1.page1.text1 AS textbox WITH ; Height = 27, ; Left = 27, ; Top = 37, ; Width = 57, ; Name = "Text1" ADD OBJECT form1.pageframe1.page1.text2 AS textbox WITH ; Height = 27, ; Left = 77, ; Top = 103, ; Width = 57, ; Name = "Text2" ADD OBJECT form1.pageframe1.page1.text3 AS textbox WITH ; Height = 27, ; Left = 131, ; Top = 33, ; Width = 57, ; Name = "Text3" ADD OBJECT form1.pageframe1.page1.text4 AS textbox WITH ; Height = 27, ; Left = 231, ; Top = 119, ; Width = 57, ; Name = "Text4" ADD OBJECT form1.pageframe1.page2.text1 AS textbox WITH ; Height = 27, ; Left = 35, ; Top = 45, ; Width = 57, ; Name = "Text1" ADD OBJECT form1.pageframe1.page2.text2 AS textbox WITH ; Height = 27, ; Left = 123, ; Top = 49, ; Width = 57, ; Name = "Text2" ADD OBJECT form1.pageframe1.page2.text3 AS textbox WITH ; Height = 27, ; Left = 205, ; Top = 53, ; Width = 57, ; Name = "Text3" ADD OBJECT container1 AS container WITH ; Top = 208, ; Left = 17, ; Width = 349, ; Height = 31, ; BackStyle = 0, ; BorderWidth = 0, ; Name = "Container1" ADD OBJECT form1.container1.command1 AS commandbutton WITH ; Top = 8, ; Left = 30, ; Height = 17, ; Width = 59, ; Caption = "Command1", ; Name = "Command1" ADD OBJECT form1.container1.command2 AS commandbutton WITH ; Top = 8, ; Left = 122, ; Height = 17, ; Width = 59, ; Caption = "Command1", ; Name = "Command2" PROCEDURE tabhandler IF INLIST(LASTKEY(),9,13) && Only interested in TAB and CR this.container1.command1.SetFocus() ENDIF ENDPROC PROCEDURE Init Local oPage As Page, HiTab, HiControl As TextBox, oControl as textbox This.pageframe1.ZOrder(1) This.container1.ZOrder(0) With This.pageframe1 For Each oPage In .Pages HiTab = 0 HiControl = '' For Each oControl In oPage.Controls If Pemstatus(oControl,'Lostfocus',5) If oControl.TabIndex > HiTab HiTab = oControl.TabIndex HiControl = oControl Endif Endif Endfor If Not Empty(HiTab) Bindevent(HiControl,'lostfocus',This,'tabhandler',7) Endif Endfor ENDWITH ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************>Hi Glenn,