Using Buttons in Viewports - DrRacket

0

Is there any way to use buttons in a Dr Racket viewport component? the structure of a button uses frames, if I try to add the viewport component as parent, it throws an error.

(define ventanaJuego (open-viewport "¿Adivina quién?" 1200 700))
(new button% [label "Verdadero"] [parent ventanaJuego])

The error:

initialization for button%: contract violation
expected: (is-a?/c area-container<%>)
given: #<viewport>
    
asked by Froilán Moya Robles 13.11.2018 в 00:05
source

0 answers