PUBLIC ox ox = CREATEOBJECT("form1") ox.show ************************************************** *-- Form: form1 (c:\test\editheight.scx) *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 01/17/08 09:18:06 PM * DEFINE CLASS form1 AS form DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT edit1 AS editbox WITH ; Height = 24, ; Left = 36, ; Top = 120, ; Width = 132, ; Value = "this is 1 row", ; Name = "Edit1" ADD OBJECT label1 AS label WITH ; AutoSize = .F., ; Caption = "Fontsize", ; Height = 17, ; Left = 64, ; Top = 27, ; Width = 48, ; Name = "Label1" ADD OBJECT fntsize AS spinner WITH ; Height = 24, ; Left = 120, ; Top = 24, ; Width = 120, ; Name = "fntsize" PROCEDURE edit_height WITH thisform as Form .fontsize = .fntsize.value .edit1.fontsize = .fntsize.value .edit1.height = .TextHeight(this.edit1.value)+6 .edit1.width = .TextWidth(this.edit1.value)+10 ENDWITH ENDPROC PROCEDURE Init this.fntsize.Value = this.FontSize this.edit_height() ENDPROC PROCEDURE fntsize.InteractiveChange thisform.edit_height() ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************