[ltk-user] Example of scrollbar available?
Jason Miller
jason at milr.com
Thu Dec 12 20:27:59 UTC 2013
On 18:39 Thu 12 Dec , Josef Wolf wrote:
> On Do, Dez 12, 2013 at 12:59:32 +0100, Josef Wolf wrote:
> > are there any examples of scrollbar usage available? I have a hard time to
> > grasp how to use them, and I can't find any examples in the documentation.
>
> With this code:
> ...
I haven't had much success with the wrapper classes for scrolled
widgets, so I do it manually. For a more full treatment, see the tk
documentation, but here's enough to get you started:
;First make a textbox and a scrollbar to go with it:
(let ((tb (make-instance 'text :width 78 :height 20))
(tbsb (make-instance 'scrollbar :orientation :vertical)))
;Now put them where you want them; I'm using pack as it's the least code:
(pack tb :side :left)
(pack tbsb :side :left :fill :y)
;Now you need to tell the two widgets about each other
(configure tbsb "command" (format nil "~a yview" (widget-path tb)))
(configure tb :yscrollcommand (format nil "~a set" (widget-path
tbsb))))
-Jason
More information about the ltk-user
mailing list