************************************************** *-- Class Library: custctl.vcx ************************************************** ************************************************** *-- Class: colchk (d:\walpole\tools\colchk.vcx) *-- ParentClass: container *-- BaseClass: container *-- Time Stamp: 11/24/00 09:54:14 AM * DEFINE CLASS colchk AS container Width = 100 Height = 17 BackStyle = 0 BorderWidth = 0 Name = "colchk" ADD OBJECT chkColChk AS checkbox WITH ; Top = 0, ; Left = 0, ; Height = 17, ; Width = 18, ; AutoSize = .T., ; BackStyle = 0, ; Caption = "", ; Name = "chkColChk" PROCEDURE centercheckbox *---------------------------------------- * Author......: Trey Walpole * Date........: September 28, 2000 *---------------------------------------- * This method may be called from the * parent Column's Resize() event * in order to keep the checkbox centered * when the Column is resized by the user. *---------------------------------------- With this.chkColChk .Left = this.parent.Width/2 - .Width/2 .Top = this.parent.parent.RowHeight/2 - .Height/2 EndWith ENDPROC PROCEDURE Init *---------------------------------------- * Author......: Trey Walpole * Date........: September 28, 2000 *---------------------------------------- If Type("this.parent.ControlSource")#"U" If !Type(this.parent.ControlSource)$"NL" *-- don't even allow this guy in here for non logical or numeric fields Return .F. EndIf this.chkColChk.ControlSource = this.parent.ControlSource EndIf this.CenterCheckbox() ENDPROC PROCEDURE Resize this.CenterCheckbox() ENDPROC ENDDEFINE * *-- EndDefine: colchk **************************************************