[R] tcltk: repeat event while button is down?
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Fri Aug 6 01:20:38 CEST 2004
Duncan Murdoch <murdoch at stats.uwo.ca> writes:
> On 05 Aug 2004 22:55:10 +0200, Peter Dalgaard
> <p.dalgaard at biostat.ku.dk> wrote :
>
> >Duncan Murdoch <murdoch at stats.uwo.ca> writes:
> >
> >> Is there a way in TCL/TK to trigger an event multiple times while a
> >> button is held down? I'd like to have an rgl scene continuously
> >> rotate until the button is released.
> >
> >Something involving "after", I'd say. Set up the rotate action to
> >reschedule itself after N milliseconds, and the button release event
> >to "after cancel".
>
> Thanks. Just one more detail: the docs I have must be old, they
> don't talk about separate button press and button release events. How
> do I attach separate event handlers to those?
<ButtonPress-1> (or just <1>), <ButtonRelease-1>, I believe. It's used
in the tkcanvas demo.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list