[ltk-user] How to configure widgets?

Josef Wolf jw at raven.inka.de
Wed Nov 21 07:49:09 UTC 2012


On Tue, Nov 20, 2012 at 11:07:15PM +0100, harven at free.fr wrote:
> > I am trying to make my first steps with ltk, and I have problems to
> > reconfigure existing widgets. Here is an example where I try to reconfigure
> > the :TEXT attribute of the LABEL-WIDGET widget whenever the checkbox of the
> > CHECK-BUTTON-WIDGET widget is clicked.
> 
> Try with setf instead of configure, i.e.
> (setf (text label-widget) val)
> instead of 
> (configure label-widget :text val)

Thanks for the help, Harven. This works.

Is this just a workaround or is this by intent? It seems that for some options
I still need the CONFIGURE function. What is the reason for this
inconsistency? How do I know which options can be set by CONFIGURE and which
need to be set by SETF? I have not noticed such inconsistencies in Perl/Tk
yet. One would use the configure method/function for everything.




More information about the ltk-user mailing list