[pygtk] A design question (continued)

Gary Jaffe gfj555 at gmail.com
Mon Jan 9 03:53:29 WST 2006


Hi --

It's been about a week (of reading docs and coding) since this thread 
has been active, so a quick review.

I wrote a program that does appointments for a doctor's office.  It 
displays 70 * 20 small rectangles in a window, each rectangle can have a 
letter and/or a colored background.  It runs too slow, taking about a 
second to re-display the window when there's new data (like a move to a 
different week or different doctor).

After getting some good advice from this list, I rewrote the program to 
use a single gtk.TextView() to display the letters and colored 
backgrounds.  This is much faster.  New data is displayed almost 
instantaneously.  The problem is that I don't like the way the letters 
look.  I attached 2 small png files showing a sample of the windows 
using the the old (slow - separate labels in separate eventBoxes) method 
and the new (fast - textView) method.  The fast method is using the best 
mono-spaced font I could find.  I would like to increase the horizontal 
space between letters, but not the vertical space.  Also, I would like 
the blue background to extend farther to the right, so the letters don't 
crash into the end of the colored background.

Is this something I can do with pango, or am I better off rewriting it 
with a gtk.DrawingArea?  If I do it in a gtk.DrawingArea, do I need to 
create each letter with gimp with the different combinations of 
backgrounds and load them as bitmaps, or is there some text facility to 
make that easier?

Thanks for any help.

Gary
-------------- next part --------------
A non-text attachment was scrubbed...
Name: slow.png
Type: image/png
Size: 778 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20060108/a203dfc6/slow.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast.png
Type: image/png
Size: 786 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20060108/a203dfc6/fast.png


More information about the pygtk mailing list