Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!news.cs.indiana.edu!purdue!mentor.cc.purdue.edu!zhengt From: zhengt@mentor.cc.purdue.edu (Tong Zheng) Newsgroups: comp.windows.interviews Subject: Rubber Banding in InterViews Keywords: Rubber Banding InterViews Message-ID: <10241@mentor.cc.purdue.edu> Date: 12 Apr 91 18:07:02 GMT Reply-To: zhengt@mentor.cc.purdue.edu (Tong Zheng) Organization: General Consultant, ME Comp. Lab, Purdue U. Lines: 48 Hello, I have two questions about doing Rubber Banding in InterViews. I believe I am using version 2.6. I am working on a project that offers user to draw a rubber banding box to select portion of a Graphic area. Well, I found a RubberRect class and implemented in my codes, I got the rectangular box, but had seen two problems, 1) When the program received a DownEvent, I created the RubberRect object, then if a MotionEvent arrives, method Track() will be used to erase previous box and draw a new box upon currect pointer position, UpEvent will terminate this rubber banding session. I think I follow the right track to form a rubber banding, but funny thing is I never am able to get a MotionEvent. So user can only see a box appearing at the end when the button is released. 2) The rubber box can't redraw itself when is exposed after a obscuring. For problem 1), has anyone had success to do a rubber banding or using MotionEvent? If so, is it possible that I can have a copy of a working sample? or could someone point out what I did wrong in my way drawing rubber banding? For problem 2), in X programming logic, I know client should handle the exposure. But in InterViews, there is no such a thing called ExposeEvent exists. Is there any alternative way to detect the exposure event in InterViews? Any help is appreciated. If there are enough interets, I will post a summary on this. --- * * |* Zheng, Tong | ARPA: tongz@ecn.purdue.edu *| |* 483 Littleton St., | UUCP: pur-ee!tongz *| |* West Lafayette, IN. 47906 | BITNET: *| |* (317)743-2239 | tongz%ecn.purdue.edu@purccvm *| |* ----------- *| |* -- student programmer, Mechanical Eng., Purdue University-- *| *----------------------------------------------------------------*