Hm.  As to the stretching -- sounds like there may be a significant
difference between Racket 6.11 and 7, or else a significant different
between Racket's drawing on Windows and Mac.  I'll try it under 7.

As to the failure to touch, yes.  That gap is the issue, although on 6.11 /
Mac it's very pronounced.  I can try it again with something like frames
but I was hoping there was a universal way.

On Wed, Sep 19, 2018 at 9:48 AM, Alex Harsanyi <alexharsa...@gmail.com>
wrote:

>
> Hi David,
>
> I am running your example code on a Windows machine with Racket 7.0, and
> the buttons do stretch vertically and horizontally when I resize the
> window.  There is a small gap between the buttons, but I think this is how
> the native buttons are drawn.  Is the problem that there is this gap?
>
> Alex.
>
> On Wednesday, September 19, 2018 at 3:04:59 AM UTC+8, David K. Storrs
> wrote:
>>
>> Given the following code, how can I (a) make the buttons actually touch
>> one another when the panel comes up and (b) stretch horizontally and
>> vertically when the window does?  I thought that having (spacing 0) on the
>> panel and (vert-margin 0) + (horiz-margin 0) on the buttons would do it,
>> but nope.
>>
>>
>> If it's relevant, I'm on OSX 10.11.6 and using Racket 6.11.  I could
>> upgrade to 6.12 if that will matter but simply haven't done it yet.
>>
>>
>> #lang racket/gui
>>
>> ;  The top-level frame
>> (define frame
>>   (new frame%
>>        [label "test"]
>>        [width 100]
>>        [height 100]
>>        (spacing 0)
>>        ))
>>
>> (define panel
>>   (instantiate horizontal-panel%
>>       (frame)
>>     (spacing 0)
>>     (stretchable-width #t)
>>     (stretchable-height #t)))
>>
>> (for ([i 3])
>>   (instantiate button%
>>       ("#" panel)
>>     (stretchable-width #t)
>>     (stretchable-height #t)
>>     (vert-margin 0)
>>     (horiz-margin 0)
>>     (callback
>>      (lambda (button event)
>>        (printf "~a~n" (send button get-label))))))
>>
>>
>> ;  Show the top-level frame.
>> (send frame 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 to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to