Rust und Racket

This commit is contained in:
2026-09-16 07:50:42 +02:00
parent bc4dc789a3
commit 815facc1cf
4 changed files with 159 additions and 70 deletions
+21
View File
@@ -0,0 +1,21 @@
```racket
#lang racket
; https://dev.to/goober99/learn-racket-by-example-gui-programming-3epm
(require racket/gui/base)
; 1. Hauptfenster (Frame) erstellen
(define frame (new frame% [label "Hallo Racket"]
[width 300]
[height 200]))
; 2. Einen Button zum Fenster hinzufügen
(define btn (new button% [parent frame]
[label "Klick mich"]
[callback (lambda (b e)
(printf "Button wurde geklickt!\n"))]))
; 3. Fenster sichtbar machen
(send frame show #t)
```