Height, Width
These properties, not surprisingly, control the height and width of visual objects, including forms and controls.
Usage |
oObject.Height = nValue nValue = oObject.Height oObject.Width = nValue nValue = oObject.Width |
Example |
frmMyForm = CREATEOBJECT("form") frmMyForm.SHOW() frmMyForm.Height = frmMyForm.Height + 20 frmMyForm.Width = frmMyForm.Width * 1.5 |
Example |
* Resize Demo frmResizeDemo = CREATEOBJECT("ResizeForm") frmResizeDemo.Show() READ EVENTS DEFINE CLASS ResizeForm as Form ScaleMode = 0 && Note that this is foxels for simplicity MinHeight = 10 Add Object edtNote as Speech Add Object btnQuit as QuitButton * Custom Properties nQuitBtnMargin = 3 nEdtBoxMargin = 5 PROCEDURE Init This.ReSize() ENDPROC Procedure ReSize ThisForm.btnQuit.Top = ThisForm.Height - This.nQuitBtnMargin ThisForm.btnQuit.Left = (ThisForm.Width - ; ThisForm.btnQuit.Width ) / 2 ThisForm.edtNote.Height = ThisForm.Height - ; ThisForm.nEdtBoxMargin ThisForm.edtNote.Width = ThisForm.Width - ; 2*ThisForm.edtNote.Left ENDPROC PROCEDURE Destroy CLEAR EVENTS ENDPROC ENDDEFINE DEFINE CLASS QuitButton AS CommandButton Caption="Quit" HEIGHT = 2 PROCEDURE Click CLEAR EVENTS ENDPROC ENDDEFINE DEFINE CLASS Speech AS EditBox Left = 3 Value = "Four score and seven years ago " + ; "our fathers brought forth on " + ; "this continent a new nation, conceived " + ; "in liberty and dedicated to the proposition " + ; "that all men are created equal." ENDDEFINE |
See Also |
Left, Top, MaxHeight, MaxWidth, MinHeight, MinWidth, ScaleMode |