Wiki Home

Remove Object


Namespace: Wiki


The Remove Object method of a Container Class is used to remove contained objects dynamically.

So how do you test for the existence of an object before you remove it? Try this:
_SCREEN.AddObject('txtTest', 'Textbox')
_SCREEN.txtTest.Visible = .T.
IF VARTYPE(_SCREEN.txtTest) = 'O'
  _SCREEN.RemoveObject('txtTest')
ENDIF



Thanks a lot, oh wise and anonymous answer provider!

See also ADDOBJECT

Category Class Design Category VFP Methods Category OOP
( Topic last updated: 2007.01.15 01:30:06 AM )