[ltk-user] Re: problem with place manager

Madhu enometh at meer.net
Tue Sep 16 07:13:50 UTC 2008

* "Peter Herth" <5921d57c0809090026l73b0ea27qae5e8544082a667e at mail.gmail.com> :
Wrote on Tue, 9 Sep 2008 09:26:15 +0200:

| A bug, the code should be:
| (defmethod place (widget x y &key width height)
|   (format-wish "place ~A -x ~A -y ~A~@[ -width ~a~]~@[ -height ~a~]"
| (widget-path widget)
|                (tk-number x) (tk-number y)
|                (and width (tk-number width))
|                (and height (tk-number height)))
|   widget)
| (will be fixed in the next LTk release too)

[I may have mentioned this a few years ago, but since it is going to be
 changed now, I would suggest replacing this signature completely.]

Tk's `place configure window' is pretty powerful (See man place(n)) but
the power is not available through LTK, through this method.

The current method's signature is too restrictive, and it also prevents
one from extending it with &rest so you can pass the other options
directly to Tk.

i.e. I'd suggest changing it to

	place (widget x y &rest rest)

where REST could contain :width <width> :height <height> :relx <relx>
 :rely <rely> etc
where each keyword maps to a corresponding option which is accepted by
the place configure command.


More information about the ltk-user mailing list