Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
19
Task/Hello-world-Graphical/Racket/hello-world-graphical.rkt
Normal file
19
Task/Hello-world-Graphical/Racket/hello-world-graphical.rkt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#lang racket/gui
|
||||
(require racket/gui/base)
|
||||
|
||||
; Make a frame by instantiating the frame% class
|
||||
(define frame (new frame% [label "Goodbye, World!"]))
|
||||
|
||||
; 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue