* C5.prg CLOSE ALL RELEASE ALL CLEAR ALL PUBLIC frmC5 frmC5=CREATEOBJECT('subform') frmC5.SHOW READ EVENTS CANCEL DEFINE CLASS subForm AS FORM NAME='frmC5' BACKCOLOR=RGB(255,0,0) AUTOCENTER=.T. PROCEDURE QUERYUNLOAD CLEAR EVENTS ENDPROC ADD OBJECT cntbig AS subBigContainer ENDDEFINE DEFINE CLASS subBigContainer AS CONTAINER BACKCOLOR=RGB(255,255,255) ADD OBJECT cntSmall AS subSmallContainer ENDDEF DEFINE CLASS subSmallContainer AS CONTAINER * Uncomment next line to get C5 <<----------------------------- * ADD OBJECT cmdRemoveObj AS subRemoveObj PROCEDURE CLICK THISFORM.cntbig.REMOVEOBJECT('cntsmall') ENDPROC ENDDEF DEFINE CLASS subRemoveObj AS COMMANDBUTTON ENDDEFINE * END C5.PRGDidn't have time to play with this for long but it also seems that the behaviour only occurs with a nested container - removing 'cntBig' with a contained commandbutton doesn't cause a problem...