[pygtk] A design question
Nicolas ROMAN
nicolas.roman at aliacom.fr
Tue Jan 3 00:06:23 WST 2006
le Mon, 02 Jan 2006 10:21:26 -0500, Gary Jaffe écrivait :
> Nicolas ROMAN wrote:
> > le Mon, 02 Jan 2006 09:22:26 -0500, Gary Jaffe écrivait :
> >
> >
> >>I wrote a pygtk application that displays ascii letters and
> >>spaces arranged as 70 columns by 20 rows. Each letter and its
> >>background color represents a potential appointment spot in a
> >>doctor's office. The user can click on any of the letters to
> >>either make or view an appointment. This is working, but is
> >>too slow. It takes about a second to redraw the letters,
> >>even when using pyrex or psyco.
> >
[snip]
> >
> > could'nt gtk.Buttons() do the job ? (not sure it will speed up
> > your app but...)
>
> Yes, but I wanted the entire thing to be flat (no relief), and
> I couldn't figure out how to get gtk.Button() to do that.
>
> I'm not sure that will speed things up either, since I would
> still be displaying 70 * 20 different widgets.
>
> I was hoping displaying one widget (gtk.TextView()) with a 70 *
> 20 character buffer would be faster.
>
and it sure would ;-)
maybe (warning, potentially stupid proposition coming) the canvas
than ? draw all letters, remembering coordinates and react
depending on the event 's coordinates. and re-draw would (should?)
only concern parts that need to be redrawn...
nicolas
--
Nicolas ROMAN Ingénieur Intégration/Développement Aliacom
http://www.aliacom.fr nicolas.roman at aliacom.fr
More information about the pygtk
mailing list