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