[cells-devel] celtk expander

Andy Chambers achambers.home at googlemail.com
Thu Nov 8 11:17:36 UTC 2007


On Nov 7, 2007 5:56 PM, Ken Tilton <kennytilton at optonline.net> wrote:

> Hmmm, come to think of it, if you are doing vanilla Celtk (not Cello)
> collapsed might not apply. I /think/ simply making, say, the middle
> widget of three invisible would cause it to be unpacked (there being no
> way to say "invisible" in Tk) and then packing would scrunch the ends
> together simply because there would be no middle.

OK I've got it working nicely now.  It's mostly the same as I
previously posted except the expansion is specified more like a
row/stack widget (i.e. you don't have to use :expansion you just put
in the widgets).  The specified expansion together with the expander
button all remain as kids for the life of the widget and an observer
on the expanded slot packs/unpacks as necessary.

My next question is about the :tk-spec keyword in deftk forms.  How
does this relate (if at all) to the allowed options you see in the tk
manual pages.  It seems like some of them correspond directly and
others don't exist.  For example...

comparing the spec at http://www.tcl.tk/man/tcl8.5/TkCmd/bitmap.htm to....

(deftk bitmap (item)
  ()
  (:tk-spec bitmap
    -state -tags
    -anchor
    -background
    -activebackground
    -disabledbackground
    -bitmap
    -activebitmap
    -disabledbitmap
    -foreground
    -activeforeground
    -disabledforeground))

the celtk spec doesn't have the -data, -file, -maskdata, -maskfile
options and the tk spec doesn't have the -state, -tags, -anchor
options.

>From what I can gather, celtk is mostly using tile widgets as the
underlying framework and some of the :tk-specs match those specs
better but there are still inconsistencies.

Cheers,
Andy



More information about the cells-devel mailing list