At Thu, 23 Feb 2017 10:09:59 +0000, Erich Rast wrote:
> I have an editor-canvas A subclasses inside a vertical-panel subclass B
> and below A there is another vertical-panel subclass C in B. C is shown
> or hidden by removing and adding it via change-children in B.
> However, even though A has stretchable-height set to #t, it does not
> resize to fill the whole area of B automatically when the C is removed.
> (C itself is not stretchable-height.)
> I tried refresh but it didn't have any visible effect and on-size does
> nothing by default. Is there a way to programmatically trigger the same
> size calculation and display adjustment as when the panels/canvases are
> created? Or do I have to do this manually?
Does the editor canvas in the example below stretch when the button
removes its parent vertical panel? (If not, you're seeing a bug...)
If so, is there a change that makes it behave like your program?
(define f (new frame% [label "Stretch"]))
(define B (new vertical-panel%
(define A (new editor-canvas%
(define C (new vertical-panel%
[label "Remove Me"]
[callback (lambda (c e)
(send B change-children (lambda (l) (list A))))]))
(send f show #t)
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.