[plt-scheme] Erase buttons

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed May 4 10:43:27 EDT 2005

Here you go.

(define f (new frame% (label "Some Buttons")))

(define (make-button n)
  (new button%
       (label (format "Button ~a" n))
       (callback
        (lambda (b c)
          (for-each (lambda (ob)
                      (unless (eq? ob b)
                        (send ob show (not (send ob is-shown?)))))
                    buttons)))
       (parent f)))

(define buttons (list (make-button 1)
                      (make-button 2)
                      (make-button 3)
                      (make-button 4)))

(send f show #t)


At Wed, 4 May 2005 16:36:36 +0200 (CEST), Bocdu jonf wrote:
> ------------------------------------------------------------------------------
> Hello 
> I will have wanted to know how by pressing on a button that with for effect to erase other 
> buttons.
> Jonathan
>  
>  
> 
> 		
> ---------------------------------
>  Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
> Créez votre Yahoo! Mail 
> ------------------------------------------------------------------------------
> Hello 
> I will have wanted to know how by pressing on a button that with for effect to erase other buttons.
> Jonathan
>  
>  
> 
> D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
> Cr?ez votre Yahoo! Mail 



Posted on the users mailing list.