self.buttonsFrame = DirectFrame(state= DGG.NORMAL, parent=self)
self.buttonsFrame["state"] = DGG.DISABLED
how do I disable DirectFrame children?
for btn in self.buttonsFrame.getChildren():
btn.node()["state"] = DGG.DISABLED
this piece of cake raises an error.
thanks in advance!
Unfortunately, due to a limitation of the Python bindings, since getChildren() is a C++ method and DirectFrame a Python class, getChildren() will return the base class NodePath and not a derived Python class like DirectFrame.
You’ll have to store the original DirectFrame children elsewhere.