I just miss the good old Tkinter
>> > Canvas and it took me some time to figure out how
to
>> > implement something similar).
>>
>
> Did you take a look at wx.lib.FloatCanvas ? It's (be
design) a different
> beast than the TK Canvas, so it could be better or
worse for your needs,
> but if nothing else, it would give you ideas how to
implement what you need.
>
> If it is missing some critical feature, let me know,
and I may add it.
>
> -Chris
I did give a quick look at FloatCanvas but at first
glance, the examples shown in the demo made me think that
only geometrical figures could be drawn, and not
bitmaps, check buttons etc... As I said I haven't looked
too much in depth so I may have chosen a more complicated
path than necessary when creating my own DC-based canvas
widgets. On the other hand, since it was also my first
application in wxPython, it proved rather educative.
Next time I'll try to do my homework and look thoroughly
at what exists before complaining. Tkinter's canvas is
actually one of the main reason that kept me going with
this GUI library for such a long time : it is
straight-forward and the tag system is rather powerful.
Fabrice
···
--------------------------------------
GANBARE! NIPPON!
Yahoo! JAPAN JOC OFFICIAL INTERNET PORTAL SITE PARTNER
http://pr.mail.yahoo.co.jp/ganbare-nippon/
キャピエ ファブリス wrote:
I did give a quick look at FloatCanvas but at first
glance, the examples shown in the demo made me think that
only geometrical figures could be drawn, and not
bitmaps, check buttons etc...
Well, it does support bitmaps, but not widgets. There is no reason it
couldn't, but I haven't had the need for it. FloatCanvas is not the way
to build a custom widget, however, that's not what it was designed for.
Next time I'll try to do my homework and look thoroughly
at what exists before complaining. Tkinter's canvas is
actually one of the main reason that kept me going with
this GUI library for such a long time : it is
straight-forward and the tag system is rather powerful.
The TK canvas is very well respected. It does deal natively with pixel
coordinates, which is one of the main things I was trying to get around.
I've heard a lot of good things about the tags system. I've considered
implementing something like that myself, but I still don't see the need.
FloatCanvas objects can be stored in arbitrary collections in python
lists (or tuples, or whatever). Then you can loop through those lists
and do whatever you want with the objects in it. I've also got a start
on implementing object groups. It's not hard, but I haven't got the code
in the main branch yet.
I'd like to hear more use cases for TK Canvas tags -- maybe they are
useful enough to add.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov