sendog3c
Jun 18, 2019 - 00:52
I want to disable a sub view, if I do that automatically all the buttons, textfield will be disable too.
Thanks.
I want to disable a sub view, if I do that automatically all the buttons, textfield will be disable too.
Thanks.
@sendog3c, this seems to work:
view.objc_instance.setEnabled_(False)
... although the contained elements do not show the visual cues of being disabled (e.g. greyed-out text), so there is little practical difference to just setting:
view.touch_enabled = False
If the visual cues are important to you, I suggest writing a little utility function that loops through the subviews of a view and sets the value of the enabled property, if it exists (use hasattr), or touch_enabled otherwise.
Thank you Maikel let me to digest it ðŸ¤ðŸ¤ðŸ¤ðŸ˜‚😂😂😂😂, before implement