guile-pstk

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 58d4028ab876a6dcc29c43f8583a1de412687880
parent 2b87f3b7c7c6c7d6b33263519a02ec2aa8ec9fb4
Author: KikyTokamuro <kiky.tokamuro@yandex.ru>
Date:   Fri, 18 Mar 2022 22:10:25 +0300

Added new example 'notebook'

Diffstat:
MREADME.md | 1+
Aexamples/notebook.scm | 33+++++++++++++++++++++++++++++++++
Aimages/notebook.png | 0
3 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -18,6 +18,7 @@ PS/TK version (http://mirror.informatimago.com/scheme/www.t3x.org/pstk/index.htm | [weather](./examples/weather.scm) | ![weather](./images/weather.png) | | [canvas](./examples/canvas.scm) | ![canvas](./images/canvas.png) | | [slider](./examples/slider.scm) | ![slider](./images/slider.png) | +| [notebook](./examples/notebook.scm) | ![notebook](./images/notebook.png) | ### Tested on ``` diff --git a/examples/notebook.scm b/examples/notebook.scm @@ -0,0 +1,33 @@ +; 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 "../") + +(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)) + diff --git a/images/notebook.png b/images/notebook.png Binary files differ.