How to get access to window elements (label, slider) from another window's event handler?
1 answer
Why would the window with which I want to interact not provide open methods for this?
And in the event you can bring the object to the desired type and call these methods.
This is the easiest option and does not break encapsulation.
There is another option:
It is possible to make all window objects public, but this is not entirely correct, as anyone who wishes can do what he pleases, and encapsulation collapses.
|