[ltk-user] Beginners question
neuss at math.uka.de
Fri Oct 27 20:58:14 UTC 2006
Hello LTK users,
As a complete GUI programming newbie I wanted to try LTK, but immediately
have several questions:
1. Are there any example programs using LTK?
2. I don't know anything about Tk, unfortunately. Is there some tutorial
to GUI programming with Tk?
3. My current goal is to have a small window which displays a new random
number whenever I press a button. I thought about using
message/textvariable in the following code snippet:
(defun zufallszahl ()
(let* ((x "0")
(f (make-instance 'frame))
(text (make-instance 'message :text x :width 100))
(button (make-instance 'button
:command (lambda ()
(setq x (format nil "~D" (random 10)))))))
(pack text :side :top)
(pack button :side :bottom)
(configure f :borderwidth 3)
(configure f :relief :sunken)
Unfortunately, (make-instance 'message :textvariable x :width 100) does not
work. Is this a bug?
4. How can I put the message above the button? I tried several
combinations of :side XXX, none did achieve it.
5. How can I change the text of the message into something larger?
Thank you very much for any hints,
More information about the ltk-user