From: Henning T. <le...@he...> - 2011-12-08 18:49:36
|
On Thu, 8 Dec 2011, Henning Thielemann wrote: > I think the best place for documenting the solution is not the FAQ but the > documentation of the Visible class. Here is my proposed patch: wxhaskell/wx$ darcs2 diff --unified src/Graphics/UI/WX/Classes.hs --- old-wxhaskell/wx/src/Graphics/UI/WX/Classes.hs 2011-12-08 19:45:56.000000000 +0100 +++ new-wxhaskell/wx/src/Graphics/UI/WX/Classes.hs 2011-12-08 19:45:56.000000000 +0100 @@ -173,6 +173,19 @@ -- | Visible widgets. class Visible w where -- | Is the widget visible? + -- + -- If you hide a widget, its space will not immediately + -- be filled by other widgets. + -- Vice versa if you make a widget visible + -- it will not have space to be rendered into. + -- That is, when changing the visibility state + -- it is advised to update the layout + -- using 'Graphics.UI.WX.Layout.windowReFit'. + -- + -- Example: + -- + -- > do set w [ visible := False ] + -- > windowReFit w visible :: Attr w Bool -- | Refresh the widget explicitly. refresh :: w -> IO () |