User Tools

Site Tools


destroy_remove_a_control_.htm
Navigation:  Language Reference > 13 - Built-in Functions >====== DESTROY (remove a control) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

DESTROY( [ first control ] [, last control ] )

blk2blue.jpg

DESTROY Removes window controls.
first control Field number or field equate label of a control, or the first control in a range of controls. If omitted, defaults to zero (0).
last control Field number or field equate label of the last control in a range of controls.

The DESTROY statement removes a control, or range of controls, from an APPLICATION or WINDOW structure. When removed, the control's resources are returned to the operating system.

DESTROYing a GROUP, OPTION, MENU, TAB, or SHEET control also destroys all controls contained within it.

Example:

Screen WINDOW,PRE(Scr)

       ENTRY(@N3),USE(Ctl:Code)

       ENTRY(@S30),USE(Ctl:Name)

       BUTTON('OK'),USE(?OkButton),KEY(EnterKey)

       BUTTON('Cancel'),USE(?CanxButton),KEY(EscKey)

      END

CODE

OPEN(Screen)

DESTROY(?Ctl:Code)              !Remove a control

DESTROY(?Ctl:Code,?Ctl:Name)    !Remove range of controls

DESTROY(2)                      !Remove the second control

See Also:

CREATE

destroy_remove_a_control_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)