How to Show or Hide an Object in a Docked window accroding to the Main Window Being Currently Showed


I would like to show or hide an object in a docked window accroding to the main window being
currently showed. Ex, I would like to show the label "Charging Info" in the docked view, only if the charging main window is currently displayed:

How can I achieve that?

Thank you!

On your Main Window/root onStartup/onShutdown System Events, use alterDock and pass in a parameter that will show/hide components.

This looks like Vision, not Perspective.

This seems like bad design. A main window should be in charge of its own presentation. Why have the docked window at all if it's only relevant based on one particular window being open?

That said, there's a [System]Client/User/CurrentWindow you can bind to that might give you the information you want?

1 Like

Hi Paul,

[System]Client/User/CurrentWindow was the solution I was looking for.