This commit is contained in:
joachimschmidt557 2019-02-23 20:59:04 +01:00
parent 9d2e745be6
commit 3ecd76609c
7 changed files with 574 additions and 0 deletions

21
GUI.rkt Executable file
View file

@ -0,0 +1,21 @@
#lang racket/gui
(require racket/gui/base)
; Make a frame by instantiating the frame% class
(define frame (new frame% [label "Example"]))
; Make a static text message in the frame
(define msg (new message% [parent frame]
[label "No events so far..."]))
; Make a button in the frame
(new button% [parent frame]
[label "Click Me"]
; Callback procedure for a button click:
[callback (lambda (button event)
(send msg set-label "Button click"))])
; Show the frame by calling its show method
(send frame show #t)