[cells-devel] tile slot
Ken Tilton
kennytilton at optonline.net
Sat Mar 22 19:38:07 UTC 2008
Andy Chambers wrote:
> Hi,
>
> Are you supposed to be able to use the tile? slot to determine whether
> a tile widget is used?
Ugh, I honestly do not recall. I think setting that to t /tells/ celtk
to use tile.
I know I tested tile on win32, seemed OK.
>
> I've been trying to convert some of the demos distributed with tk
> itself to celtk but because
> the tile widgets are used by default, you can't set any style properties.
>
> I tried the code below but cells thinks the relief slot needs a
> parent. I get the error....
>
> "New as of Cells3: parent must be supplied to make-instance of KEYWORD
> kid RELIEF"
That is different, you just have to check all the macrology to make sure
the :parent slot is picked up from *parent* or self or something,
>
> (defmodel tk-labels (window)
> ()
> (:default-initargs
> :title$ "Label Demonstration"
> :kids (c? (the-kids
> (mk-stack (:packing (c?pack-self "-side top"))
> (mk-label :wraplength "4i"
> :tk-justify 'left
> :text (concatenate 'string
> "Five labels are displayed below: three textual ones on the left and a bitmap"
> "label and a text label on the right. Labels are pretty boring "
> "because you can't do anything with them."))
> (mk-row ()
> (mk-stack (:pady 2
> :layout-anchor 'w)
> (mk-label :text "First Label")
> (mk-label :tile? nil)
> :relief (c? 'raised)
> :text "Second Label, raised"
>
> (mk-label :tile? nil
> :text "Third Label, sunken"
> :relief (c? 'sunken)))))))))
>
> Am I going about this the wrong way?
>
> Another problem I'm having is to do with packing. Are you really
> supposed to be able to
> express the layout of a whole app with just one pack statement?
I think rows and stacks supply useful packing by default which one
overrirdes at will.
kenny
More information about the cells-devel
mailing list