Tuesday, 6 September 2011

Disabling Components which contains children(buttons), and preventing from mouse events.

I have many buttons in HBox. Instead of disabling each button, I've disabled HBox. But I am able to click buttons even though the HBox is disabled.


Solution:
setting the mouseChildren and mouseEnabled to false when you want to have your HBox disabled.

myHBox.enabled = false;
myHBox.mouseChildren = false;
myHBox.mouseEnabled = false;

No comments:

Post a Comment