<br><br><div><span class="gmail_quote">On 27 Oct 2006 22:58:14 +0200, <b class="gmail_sendername">Nicolas Neuss</b> <<a href="mailto:neuss@math.uka.de">neuss@math.uka.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello LTK users,<br><br>As a complete GUI programming newbie I wanted to try LTK, but immediately<br>have several questions:<br><br>1. Are there any example programs using LTK?</blockquote><div><br>Last I looked, there was a substantial little demo at the end of the source file. may have been called ltktest. That even has something pretty close to what you are trying to do (and a lot more).
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2. I don't know anything about Tk, unfortunately. Is there some tutorial<br> to GUI programming with Tk?
</blockquote><div><br>Just go to the Tcl/Tk site and you'll find quite a lot of info.<br> <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
3. My current goal is to have a small window which displays a new random<br> number whenever I press a button. I thought about using<br> message/textvariable in the following code snippet:<br><br>(defun zufallszahl ()
<br> (with-ltk ()<br> (let* ((x "0")<br> (f (make-instance 'frame))<br> (text (make-instance 'message :text x :width 100))<br> (button (make-instance 'button<br> :master f<br>
:text "Next"<br> :command (lambda ()<br> (setq x (format nil "~D" (random 10)))))))<br> (pack f)<br> (pack text :side :top)<br> (pack button :side :bottom)
<br> (configure f :borderwidth 3)<br> (configure f :relief :sunken)<br> )))<br><br>Unfortunately, (make-instance 'message :textvariable x :width 100) does not<br>work. Is this a bug?<br><br>4. How can I put the message above the button? I tried several
<br> combinations of :side XXX, none did achieve it.<br><br>5. How can I change the text of the message into something larger?<br><br>Thank you very much for any hints,</blockquote><div><br>I think I see quite a few problems (and my LTk is rusty) so I will defer to others. In the meantime you might start over with ltktest.
<br><br>kt<br><br></div></div><br>