I like this, but I'm wondering if it would be possible to use this on a label in a header window. For example, I have an application which contains a header screen which is always open, and shows the navigation tab strip, user, date time, etc. Could I somehow get the name from the screen below the header to appear in the header?
The header screen will always be open. Perhaps it is possible to find out which other window is open and to use that window path instead of the parent window path. Please let me know if you have an idea of how that could work. Thank you.
Thanks, I ended up trying this by adding it to the property change script on the label in the header, it works just once though and doesn’t update when I switch screens:
windows = system.gui.getOpenedWindows()
for window in windows:
pth = window.getPath()
if pth != 'Header/Navigation':
system.tag.write('[client]Visualization/WindowLabel',pth)
else:
pass
I assume I could put this into a client script which runs in intervals, but that seems to be a bit overkill. I am looking for a solution where I don’t have to add a script to every screen if possible.
EDIT: If I put this into the mouseMotion, mouseMoved event handler on the label, then it updates the label whenever I change screens. Is that a bad idea though, can it be too resource intensive to have it update in that way?
Just put a print statement in to see how often it runs.
If the mouse only goes over it when you are navigating then the resource hit would be negligible.
I'm trying this by adding it to the property change script on the label in the navigation, it works just once though, and doesn’t update when I switch screens.