Changes between Initial Version and Version 1 of Ticket #8519


Ignore:
Timestamp:
Jan 28, 2009, 4:07:12 AM (11 years ago)
Author:
bill
Comment:

Maybe widgets should have show()/hide() methods or onShow()/onHide() callbacks, plus some way to tell if they are hidden.

This also relates to #5528.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8519 – Description

    initial v1  
    33If a user calls addChild() or removeChild() on a layout widget that's been started, but is hidden, then the layout widget will try to do layout even though it's display:none, and this will result in errors.   For example:
    44
    5  1. page has TabContainer where one of the children is a BorderContainer
    6  2. user selects the BorderContainer tab of the TabContainer (now the BorderContainer is both started and sized)
    7  3. user selects another tab (now the BorderContainer is display:none)
    8  4. programatically, something calls BorderContainer.addChild()
     5 1. page has !TabContainer where one of the children is a BorderContainer
     6 2. user selects the !BorderContainer tab of the TabContainer (now the !BorderContainer is both started and sized)
     7 3. user selects another tab (now the !BorderContainer is display:none)
     8 4. programatically, something calls !BorderContainer.addChild()
    99
    1010Probably, if the layout widget is hidden when addChild()/removeChild() is called then it should just set a flag to re-layout itself when it becomes visible (at which point the parent widget will call resize()).