IF PEMSTATUS(_SCREEN, [oTestToolBar], 5) _SCREEN.oTestToolBar = NEWOBJECT([TestToolBar]) ELSE _SCREEN.ADDPROPERTY([oTestToolBar], NEWOBJECT([TestToolBar])) ENDIF _SCREEN.oTestToolBar.ADDOBJECT([TbBut1], [CommandButton]) _SCREEN.oTestToolBar.ADDOBJECT([TbBut2], [CommandButton]) _SCREEN.oTestToolBar.SHOW()VFP help says
When you use AddObject to add an object to a container, the object's Visible property is set to False (.F.)and it is TRUE, when I launch the form, the Toolbar appear on screen but no buttons is shown (as though it is empty).
LOCAL oBut FOR EACH oBut IN THIS.CONTROLS oBut.VISIBLE = .T. ENDFORThen only the toolbar come up as expected with the 2 buttons added to it.