开发者

Does disabling Parent component affect its Child components?

开发者 https://www.devze.com 2023-03-31 22:21 出处:网络
I have many buttons in HBox. Instead of disabling each button, I\'ve disabled H开发者_如何转开发Box. But I am able to click buttons even though the HBox is disabled.

I have many buttons in HBox. Instead of disabling each button, I've disabled H开发者_如何转开发Box. 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;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号