-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnotebook.scm
36 lines (29 loc) · 895 Bytes
/
notebook.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
; PS/Tk Example Program "Notebook"
; Copyright (C) 2022 Daniil Archangelsky aka Kiky Tokamuro
; See the PS/Tk license for conditions of use.
(add-to-load-path
(string-append
(dirname (current-filename))
"/../"))
(use-modules (pstk))
(tk-start)
(tk/wm 'title tk "Notebook")
(tk/wm 'resizable tk 0 0)
(ttk-map-widgets 'all)
(ttk/set-theme "clam")
(let* ((notebook (tk 'create-widget 'notebook
'height: 200
'width: 200))
(frame1 (tk 'create-widget 'frame))
(label1 (frame1 'create-widget 'label
'text: "Page 1"
'font: "Hack 20"))
(frame2 (tk 'create-widget 'frame))
(label2 (frame2 'create-widget 'label
'text: "Page 2"
'font: "Hack 20")))
(notebook 'add frame1 'text: "One" 'sticky: 'we)
(notebook 'add frame2 'text: "Two" 'sticky: 'we)
(tk/pack label1 label2)
(tk/pack notebook)
(tk-event-loop))