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