Change Toolbar Location Based on Viewer Status

How would one automatically change a toolbar's location based on a viewer pane open/close event?

OnListerUIChange is the event.