[cells-devel] tile slot

Andy Chambers achambers.home at googlemail.com
Sat Mar 22 18:26:21 UTC 2008


Hi,

Are you supposed to be able to use the tile? slot to determine whether
a tile widget is used?

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"

(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'd
like to have a panel
of expander widgets each of which is packed so that it fills on the x-axis.

I expect that other panels would probably have different packing
requirements but
if you put more than one (c?pack-self ...) in an app, you get an error
saying "don't
specify packing here.

Cheers,
Andy



More information about the cells-devel mailing list