canvas.create_window: access the window via the canvas?

Nick Perkins nperkins7 at home.com
Tue May 29 21:24:33 EDT 2001


> Is there a way to access the Entry widget via the Canvas window ID?
>
> Thanx a lot,
> Anna

I don't know about that, but i think your 'alternate' idea
(of keeping another array to hold references to widgets)
is actually better.

Maybe a better variation would be to have your array hold
tuples of (id,widget), or dictionaries of {'id':id, 'widget':widget},
or even instances of some very simple class...

This approach might allow you greater flexibility down the road:
you can very easily add other information to the array,
without having to have multiple arrays.






More information about the Python-list mailing list