[ltk-user] how to read properties of widgets

Peter Herth herth at peter-herth.de
Fri Sep 2 15:11:17 UTC 2011


Hi Andre,

the direct counterpart to configure is cget which can be used to query
properties. In your case however, I guess you want to catch the
resizing of a canvas widget. To do that, bind the <configure> event
like:
(bind canvas "<Configure>" (lambda (event)
         (format t "I am ~a wide and ~a high~%" (event-width event)
(event-height event)))
If you decide to publish your client, please notify the list, as its
great to know when someone writes an LTk based application :)

Peter


On Thu, Sep 1, 2011 at 4:34 AM, Andre RsFiveTwo <rs.andre at gmail.com> wrote:
> Hi,
> I'm starting to use the ltk library to build a twitter client and I'm liking
> it a lot.
> I'm having trouble trying to read the properties of widgets.
> I know for to set them, using configure, but I can't read them back.
> More specifically, I'm trying to read the width and height of a canvas.
> Any help would be appreciated.
> Thanks,
> André
>
> _______________________________________________
> ltk-user site list
> ltk-user at common-lisp.net
> http://common-lisp.net/mailman/listinfo/ltk-user
>




More information about the ltk-user mailing list