Some time ago I wrote a little program in Tcl/Tk that took the values
from 3 sliders and performed a calculation using these values. The
calculation was of course automatically repeated each time a slider was
moved.
It is proving most difficult in Python. How do I pass the .get() values
to my
Matt Hammond wrote:
> On Sun, 21 Aug 2005 08:09:55 +0100, m7b52000
> wrote:
>
>> It is proving most difficult in Python. How do I pass the .get()
>> values to my calculating function? Do I use the command option for
>> each slider? e.g command = Calc(a.g
Matt Hammond wrote:
> On Mon, 22 Aug 2005 12:16:01 +0100, m7b52000 <[EMAIL PROTECTED]>
> wrote:
>
>>> command = lambda : Calc(a.get())
>
>
>> I get the following message when I use lambda as above:
>>
>> TypeError: () takes no arguments
Matt Hammond wrote:
>> A. Partial success with : command = Calc. A slider will now pass
>> its argument to a function without problem. My Calc function however
>> is expecting 3 arguments - 1 from each slider i.e moving any of the
>> 3 sliders should cause a recalculation. I am now gettin
Problem solved. use 'command = Calc' to call my Calc function but ignore
the argument passed to it. Create a list with the following elements -
a.get(), b.get() and c.get(). Every time a scale slider is moved, Calc
will retrieve the current scale values and I can do with them whatever I
want...