[racket] Fwd: [racket-bug] all/14865: Instances of button% don't not respond to (stretchable-height #t) and [min-height 300].

From: Stephen De Gabrielle (spdegabrielle at gmail.com)
Date: Wed Dec 3 10:58:52 EST 2014

Even a tiny bitmap will make the button vertically stretchy, but it weirdly
makes the button bigger.
add this to my last test

(new button%
     [label (list (make-bitmap 1 1) "stretchy" 'left )]
     [parent frame]
     (stretchable-width #t)
     (stretchable-height #t)
     (callback
      (lambda (button event)
        (printf "stretchy"))))

Stephen


On Wed Dec 03 2014 at 3:45:54 PM Stephen De Gabrielle <
spdegabrielle at gmail.com> wrote:

> I've worked out it only happens when you have a single line of text- two
> lines stretch fine, bitmap stretch fine too
>
> ---
>
> #lang racket/gui
>
> ;;; The top-level frame
> (define frame
>   (instantiate frame%
>     ("Test")))
>
> (new button%
>      [label (send /paste in an image/ get-bitmap)]
>      [parent frame]
>      (stretchable-width #t)
>      (stretchable-height #t)
>      (callback
>       (lambda (button event)
>         (printf "doesnt stretch vertically:("))))
> (new button%
>      [label (send /paste in an image/ get-bitmap)]
>      [parent frame]
>      (stretchable-width #f)
>      (stretchable-height #f)
>      (callback
>       (lambda (button event)
>         (printf "doesnt stretch vertically:("))))
>
> (new button%
>      [label "doesn't stretch vertically "]
>      [parent frame]
>      (stretchable-width #t)
>      (stretchable-height #t)
>      (callback
>       (lambda (button event)
>         (printf "doesn't stretch vertically:("))))
>
> (new button%
>      [label "stretchy
> "]
>      [parent frame]
>      (stretchable-width #t)
>      (stretchable-height #t)
>      (callback
>       (lambda (button event)
>         (printf "stretchy"))))
>
> ;;; Show the top-level frame.
> (send frame show #t)
>
>
>
> On Wed Dec 03 2014 at 3:42:24 PM Jens Axel Søgaard <jensaxel at soegaard.net>
> wrote:
>
>> > Is anyone else getting this bug?
>> Yes
>>
>> 2014-12-03 15:59 GMT+01:00 Stephen De Gabrielle <spdegabrielle at gmail.com
>> >:
>> > Is anyone else getting this bug?
>> >
>> > On OS X buttons stretch horizontally, but not vertically
>> >
>> > Cheers,
>> > Stephen
>> >
>> > Test
>> > #lang racket/gui
>> >
>> > ;;; The top-level frame
>> > (define frame
>> >   (instantiate frame%
>> >     ("Test")))
>> >
>> > (new button%
>> >      [label "Stretchy Button  :)"]
>> >      [parent frame]
>> >      (stretchable-width #t)
>> >      (stretchable-height #t)
>> >      [min-height 300]
>> >      (callback
>> >       (lambda (button event)
>> >         (printf "doesnt stretch vertically:("))))
>> >
>> > ;;; Show the top-level frame.
>> > (send frame show #t)
>> >
>> > ---------- Forwarded message ---------
>> > From: <bugs at racket-lang.org>
>> > Date: Mon, 1 Dec 2014 at 23:20
>> > Subject: Re: [racket-bug] all/14865: Instances of button% don't not
>> respond
>> > to (stretchable-height #t) and [min-height 300].
>> > To: <spdegabrielle at gmail.com>
>> >
>> >
>> > Thank you very much for your problem report.
>> > It has the internal identification `all/14865'.
>> > You can check on the status of your problem report at
>> >   http://bugs.racket-lang.org/query/?cmd=view&pr=14865
>> >
>> > If you wish to provide further information regarding this problem
>> > you can do so as a reply to this message.  (But please make sure
>> > that your mailer replies to both "bugs" and "bug-notification".)
>> >
>> >
>> > ____________________
>> >   Racket Users list:
>> >   http://lists.racket-lang.org/users
>> >
>>
>>
>>
>> --
>> --
>> Jens Axel Søgaard
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141203/5f120719/attachment.html>

Posted on the users mailing list.