On Wed, 7 Dec 2011, David Virebayre wrote:

2011/12/6 Henning Thielemann <lemm...@henning-thielemann.de>

      I have a textCtrl 'editor' and a menu item 'editorVisible' that controls
      the visibility of the textCtrl.

          set editorVisible
              [ on command := do
                   b <- get editorVisible checked
                   set editor [ visible := b ] ]


I had the same problem, and I couldn't solve it the way I wanted.
It's old but I think I read that I shouldn't use visible for this, but remove 
the
element from the layout and re-set the modified layout.


I got it working by adding 'windowReFit editor' or 'windowReLayout frame' after 'set editor [ visible := b ]'.

I do not know, whether this is intended behaviour or an ugly hack. The official example controls.cpp uses a BoxSizer object and its Show method. I am uncertain how to translate this to wxhaskell. How do I create a BoxSizer object? With boxSizerCreate or sizerFromLayout? How do I add the BoxSizer object? By converting it to a Layout using 'sizer'?

I think the best place for documenting the solution is not the FAQ but the documentation of the Visible class.

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
wxhaskell-users mailing list
wxhaskell-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxhaskell-users

Reply via email to