From the description of your setup on page 1 it sounds like you already know 
this, but...

If pic0 (on page 0) and pic1 (on page1) are both the same size and formatted to 
Truncated (non aero) you can 
OBJECT GET SCROLL POSITION ( pic1 ; vPosition ; hPosition )  // marker pic
OBJECT SET SCROLL POSITION ( pic0 ; vPosition ; hPosition; * ) // waveform pic
in the On Scroll event of pic1

Note the 4th (*) parameter in OBJECT SET SCROLL POSITION. If pic1 is centered, 
pic0 will get set to the same position.

Keith - CDI

> On Aug 26, 2019, at 2:00 PM, Peter Mew via 4D_Tech <[email protected]> 
> wrote:
> 
> Hi
> Heres the thing
> I have an audio waveform (You can think of it as a map)
> I want to be able to choose a location somewhere in the waveform, move the
> waveform so the chosen location is in the centre of the waveform, and zoom
> in X 2 to the location. Then drop a marker at that point
> and then to be able to do it again and again.
> Moving the location point to the centre of the window is easy, zooming the
> waveform X2 is easy, but I cant figure out how to move (Scroll) the
> waveform so that the desired location is also in the centre of the window
> The Window in which the Waveform is displayed, is a fixed size, and  the
> waveform is a finite length
> Im starting with a picturecontaining the waveform on page 0 of a form, with
> the markers on page 1
> Any pointers you could provide would be very welcome
> thanks
> -pm
> 4D v13.6

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to