문제

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. Disabling parent component will not make difference on its child? it shows like disabled but mouse events will generate. Please can you give me any suggestions?..

도움이 되었습니까?

해결책

try also setting the mouseChildren and mouseEnabled to false when you want to have your HBox disabled. That way, clicking of children will also be disabled.

myHBox.enabled = false;
myHBox.mouseChildren = false;
myHBox.mouseEnabled = false;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top