Pythoncard Multiple components

Adrian Smith skepsis at blueyonder.co.uk
Wed Oct 8 16:27:59 EDT 2003


I am using pythoncard 0.7.2 for windows.

I am trying to use the same code for a large number of buttons so
started out by using
def on_mouseDown(self,event):
    
but then I need to display the button that I pressed but you can only
have an absolute component name like:
    self.component.Button1.label = "clicked"

How can I identify the button pressed and still use the same procedure
to update  the clicked button? I tried self.component.label =
"clicked" with out the reference to the actual button used?

Any ideas, especially snippets of code if you have to start using 
self.components.data etc.

A second question occurres: Is it possible to create a component at
run time? If so how would you start.
Thanks 


"Python... the way C++ programming should be :)"




More information about the Python-list mailing list