home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / windows / x / 20721 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  1.8 KB

  1. Path: sparky!uunet!mcsun!uknet!lsl!snail
  2. From: snail@lsl.co.uk
  3. Newsgroups: comp.windows.x
  4. Subject: Re: Sync-scroll of multiple drawing areas.
  5. Message-ID: <1993Jan4.170441.2883@lsl.co.uk>
  6. Date: 4 Jan 93 17:04:41 GMT
  7. References: <9212301627.AA12915@zen.WES.ARMY.MIL>
  8. Organization: Laser-Scan Ltd., Cambridge
  9. Lines: 36
  10.  
  11. In article <9212301627.AA12915@zen.WES.ARMY.MIL>, brown@zen.wes.army.MIL (Paul Brown) writes:
  12. > Setup: Cray Y-MP, UNICOS 6.0, X11R4, Motif 1.1
  13. > My question is: can I somehow fake the scroll bar movement event within
  14. > each of these drawing areas so that the movement is handled by the callbacks
  15. > that are already registered (just as if I had very rapidly clicked each
  16. > scroll bar area with the mouse)?
  17.  
  18. You don't say Motif Drawing Areas, but you do indicate Motif, so I'll assume
  19. you mean Motif DAs.
  20.  
  21. The answer is yes, you can fake them up, but you don't need to fake events,
  22. just include a few calls to the following:-
  23.  
  24.     XmScrollBarGetValues(...);     use this to determine where you are
  25.                                          in one window, then with the results
  26.                                          (and possibly some tweaking for your
  27.                                           app) use
  28.  
  29.     XmScrollBarSetValues(...);    to set the data for the new windows.
  30.  
  31. I did this to synchronise two lists, so I could grab any list and have all the
  32. lists move. If you do this then you usually need a lock variable to prevent a
  33. never ending loop condition. Not hard to code though...
  34.  
  35. All the best.
  36. > Thanks for your ideas.
  37.  
  38. You're welcome.
  39. -- 
  40. snail@lsl.co.uk      
  41.  
  42. "Washing one's hands of the conflict between the powerful and the powerless
  43.  means to side with the powerful, not to be Neutral."
  44.                                                      Quote by Freire.
  45.                                                      Poster by OXFAM.
  46.