Re: How to bring up tooltip text for certain words in a GTK textview?
- From: richard boaz <ivor boaz gmail com>
- To: Ken Resander <kresander yahoo com>
- Cc: gtk-list gnome org
- Subject: Re: How to bring up tooltip text for certain words in a GTK textview?
- Date: Wed, 19 May 2010 20:06:48 +0200
i have had to do this and solved it just like you have proposed. if you do go with this method, some heads-ups: the "extra" issues one must handle when doing this are:
- unless gtk is now providing direct access to tooltip style pop-ups, you must create it yourself
- meaning that you must create and manage your own borderless top-level window
- whose location must be explicitly specified to be placed onto the screen
- calculation of the window location coordinates must access the root-window where to the tooltip is to be located on top of, and
- since you don't have access to the size of the WM's borders on the root window, a little "guessing" as to the WM's size must be taken into account
but, i can verify that this method should work. if you'd like the little bit of code i've come up with to solve this problem, let me know, happy to forward.
cheers,
richard
On Wed, May 19, 2010 at 7:50 PM, Ken Resander
<kresander yahoo com> wrote:
A textview shows help text with many 'technical' words that users may not know or remember. I would like a tooltip text with a short explanation to pop up when a user hovers the cursor over a technical phrase. There is a lookup table from technical phrases to explanations. I am thinking about using the mouse move event to get x,y then getting the technical phrase from x,y, then looking up the explanation and outputting the tooltip text.
Are there better ways?
|
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]