[pygtk] TextView focus look
Felix Rabe (public)
public at felixrabe.textdriven.com
Thu Aug 31 04:47:10 WST 2006
Hi,
Mike Bernson wrote:
> I would like the focus to act like a entry widget. That is show a
> boarder when widget is not in focus. When the widget is focused I would
> like the border to show it has focus like must other widgets.
This sounds useful. Anybody interested in writing a gtk.EventBox-style decorator widget that adds just this kind of border? Or has it been done already?
Btw, as far as I can tell, I'm using a theme (Mist) that does not indicate a gtk.Entry's focus (probably to save space, the border isn't shown), so better don't count on visible focus indication at all, it might not be available to the user.
But anyway, such a decorator would be sweet.
> Also the insert-at-cursor does not get called when I type into the
> widget. Is there any signal that I can use to limit the number of
> character in the widget. (I can find a property to control max number of
> character like the entry widget)
Connect to the "key-press-event", use TextBuffer methods to find out about the cursor's position in a line, and use the return value of the callback to prevent or allow insertion of the pressed key as a character.
Greetings,
Felix
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
More information about the pygtk
mailing list