help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: tooltip-show with a timer


From: Thierry Volpiatto
Subject: Re: tooltip-show with a timer
Date: Sat, 31 Jan 2009 22:10:11 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

Hi
Erik Iverson <iverson@biostat.wisc.edu> writes:

> If you don't know, you can then cancel the timer with
>
> M-x cancel-function-timers <RET> moving-tooltip <RET>

If you want to cancel timer you have to set it explicitely:

,----
| (setq my-timer (run-with-timer ....))
| (cancel-timer my-timer)
`----

> Erik Iverson wrote:
>> Hello all,
>>
>> Could someone help me understand what is going on here?
>>
>> Define a function called moving-tooltip, which simply shows a
>> tooltip that says "hi".
>>
>>
>> (defun moving-tooltip ()
>>  (tooltip-show "hi"))
>>
>> Then, hook the new function up to a timer that runs every two seconds.
>>
>> (run-with-timer 1 2 'moving-tooltip)
>>
>> Let the mouse come to rest, and you'll see the tooltip.  Don't move
>> the mouse, and the next time the tooltip timer is called, the
>> tooltip gets moved (specifically, to the upper-left corner of my
>> screen).
>>
>> Any ideas as to what is happening here?

,----[ C-h f tooltip-show RET ]
| tooltip-show is a compiled Lisp function in `tooltip.el'.
| 
| (tooltip-show text &optional use-echo-area)
| 
| Show a tooltip window displaying text.
| 
| Text larger than `x-max-tooltip-size' is clipped.
| 
| If the alist in `tooltip-frame-parameters' includes `left' and `top'
| parameters, they determine the x and y position where the tooltip
| is displayed.  Otherwise, the tooltip pops at offsets specified by
| `tooltip-x-offset' and `tooltip-y-offset' from the current mouse
| position.
| 
| Optional second arg use-echo-area non-nil means to show tooltip
| in echo area.
| 
| ===*===*===*===*===*===*===*===*===*===*===
`----

>> I'd love it if the tooltip just stayed where it was if the mouse
>> didn't move.
>>
>> Thanks,
>> Erik
>>
>>
>
>
>

-- 
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France





reply via email to

[Prev in Thread] Current Thread [Next in Thread]