Ltk is proving very frustrating due to missing and sometimes incorrect documentation. (You'll find that the button styling options don't work)
I'm trying to make a simple scrolled frame that contains NxN many buttons. Unfortunately, the scroll bars never seem to "get it". It would seem like a no brainer that when you shove too many things inside a container it provides a scrolling mechanism automatically. We've been doing this in TUIs and GUIs for a LONG time.
Can anyone fix the code given below? Bonus points if you can figure out how to colorize the buttons a mixture of colors.
<code>
(defun run-demo ()
(with-ltk ()
(wm-title *tk* "NxN Button Tray")
(set-geometry *tk* 480 320 0 0)
(let* ((sw (make-instance 'scrolled-frame :master *tk*)))
(dotimes (y 20)
(dotimes (x 20)
(let* ((b (make-instance 'button
:master (canvas sw)
:text (format nil "(~a,~a)" x y))))
(grid b x y))))
(pack sw))))
</code>
Here is a screenshot of the problem. The scrollbars refuse to see their internal widget needs scrolling.
Thank you greatly for taking a whack at it... Sincerely, Pixel_Outlaw