Re: questions about GtkTextView (gtk2)



Wayne Schuller <k_wayne linuxpower org> writes:

Is there a way to catch a signal when the user has passed the mouse over
a word in the GtkTextView?

You can of course connect to motion events and just call
get_iter_at_location() or whatever it's called to see which word you
are on. You can also handle the "event" signal on a tag, if there's a
specific tag on the word.

I would like words to highlight (change color) when the user passes the
mouse over them. (plus some other stuff)...

Should be easy, just handle motion events (and enter/leave events)
and apply colored tags.

I have thought about using the GnomeCanvas for this, but I think that is
very slow with lots of text. (I don't mind linking to the gnome2
libraries)

Yes I would not use the canvas for this, the text features aren't good
enough.

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]