Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Visibility change event not firing when visibility changes

    SmartClient Version: v9.0p_2013-08-06/LGPL Development Only (built 2013-08-06)

    IE 9.0.8112.16421

    I have a UI with two panels and one of them has a resize bar set. Because of user settings I am trying to come up with one of the panels collapsed. I am doing this by initially hiding that canvas. I need to update the saved user settings if the user expands the panel by clicking on the resize bar. To do this I register for the VisibilityChanged event. As the visibility toogles I save off the new settings. Normally this works great. However in the initial case when the canvas is initially hidden, when the resize bar is clicked the canvas becomes visible and shows, but the VisibilityChanged event is NOT fired.

    The attached sample demostrates this. If you look at the GWT log output you will see that when the resize bar is clicked the resize handler gets called and the visibility changes from false to true (on part2), but the VisibilityChangedHandler is not called. If you continue to click on the resize bar to hide/show the canvas you will see from the log that it works correctly after that.
    Attached Files

    #2
    This is because the widget is actually going from not drawn to drawn state (creating its representation in the DOM) rather than changing visibility. You can add a DrawHandler to catch this case.

    Comment

    Working...
    X