19 Dec 2009 21:58
Scrollable celtk widgets
Andy Chambers <achambers.home <at> googlemail.com>
2009-12-19 20:58:55 GMT
2009-12-19 20:58:55 GMT
One annoying limitation of tk widgets is that only text and canvas support the commands required for scrollbars. So I made the `mk-scrollee' macro. Used in conjunction with a new type of canvas item I created `window-item', we can wrap any tk window in a canvas so that it can be scrolled. I tried making :scroll-region a rule where the dimensions are derived from the wrapped window but got an assertion error in tk-create-event-handler-ex. Is that because it's trying to get the dimensions of a widget that's not been created yet? How could I get around this? As always, feel free to import this stuff into celtk/cello if you want. Cheers, Andy (deftk window-item (item) () (:tk-spec window -anchor -height -width -state -tags -window )) (defmacro mk-scrollee ((&key (height 500)(Continue reading)
RSS Feed