Andy Chambers | 19 Dec 2009 21:58

Scrollable celtk widgets

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)


Gmane