I am rewriting an application I wrote years ago in XForms.  XForms had a 
widget called a browser that allowed multiple lines of text to be displayed.  
The user could then click on one of the lines of text, and that line number 
would be returned so that the line could be highlighted or whatever.

I am trying to emulate that behavior with pygtk using the GtkText widget.  Is 
this the best way to go about it?  I display several lines of text in a 
monospaced font.  When the user clicks on a line I plan to determine which 
line was selected and change the background of that line to yellow to make it 
look highlighted.  I will space fill the line with just the right number of 
spaces to make the whole line turn yellow.

There are two things that are not optimal (which may be due to my inexperience 
with pygtk).  The first is that when the cursor is over the text box, the 
pointer turns into an 'insert text' type of pointer (something similar to a 
capital I).  This is true even when I set_editable to FALSE.  Since the user 
is supposed to select a line rather than insert text, this may be confusing.  
The other thing is that there is no horizontal scroll bar.  The lines have a 
variable length, so I must truncate the lines that are too long.

Am I going about this the right way, or is there another widget that will 
emulate the XForm browser widget better?

Thanks for your help.

Gary
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to