206 views
in GUI Development by
For example, in UIKit, if isHidden is true, the view does not respond to keyboard events.

Thanks!

1 Answer

0 votes
by

Hello Gloria,

this is in fact a good question. At its very beginning, more than 20 years ago, we decided to treat the visible and enabled states separately. Doing this we had different use cases in mind like temporarily invisible components being still able to handle keyboard events. Our intention was to make the Mosaic framework as flexible as possible even for extraordinary application cases. The developer should have the maximum control over application functionality.

Also crucial in our decision was the fact, that state visible == true does not guarantee that the affected view or component is really visible. For example, changing the Opacity or Color property to the value 0 or #00000000 also causes the view to disappear from the screen exact as if the property Visible were set false. Consequently, it would be necessary to evaluate many different properties to get a trustworthy isHidden state. This could even include the state of properties belonging to superior components. 

An interesting thought experiment: if the property Opacity == 1 (almost invisible, 0 is fully transparent, fully opaque is 255), may the affected view still receive the focus?

Does it help you further?

Best regards

Paul Banach

Embedded Wizard Website | Privacy Policy | Imprint

...