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

window-click-event/scrollin



                       Subject:                                Time: 12:49 PM
  OFFICE MEMO          window-click-event/scrolling            Date: 3/28/91
I've set up a subtype of fred window and modified its
window-click-event-handler, so that a function is called whenever a particular
set of text is clicked (as in hypertext). Unfortunately, it is also activated
when the window is scrolled. The docs indicate that the handler isn't called
with clicks in the title bar or zoom/size/close boxes, but nothing about
excluding the scroll bars. It's as if, when the window is scrolled, whatever
text has been previously selected in the window was again clicked directly.
This clause:

(cond
 ((and
   (< (point-h where) (- (point-h (ask (self) (window-size))) scroll-width))
   (< (point-v where) (- (point-v (ask (self) (window-size))) scroll-width)))
  (whatever-you-want-to-happen-when-clicked)))

will exclude it, with scroll-width set to 16. Is there any more direct way to
do this?

Thanks, John Jachna