Forum

    • Register
    • Login
    • Search
    • Categories

    Script viewport position

    Feature Requests
    script viewport scroll list
    3
    6
    88
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healey
      d.healey last edited by

      I believe this was already asked somewhere but I couldn't find it.

      Is there a way to script the vertical or horizontal scrolling of a viewport?

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      ustk 1 Reply Last reply Reply Quote 0
      • ustk
        ustk @d.healey last edited by ustk

        @d-healey Nope you can't... I tried to implement it myself but the viewport is a very strange beast in Hise, and I don't see the relation to Juce and where/how to modify the existing behaviour (or add methods)

        Tired to press F5 in the forum...
        Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

        1 Reply Last reply Reply Quote 0
        • Christoph Hart
          Christoph Hart last edited by

          I've added a viewPositionX and viewPositionY property to the viewport, so you can set it using the usual methods.

          However it's unidirectional though, so scrolling the viewport with the scrollbar will not change this property (adding this is a bit more complicated, but let me know if you require this).

          d.healey 2 Replies Last reply Reply Quote 3
          • d.healey
            d.healey @Christoph Hart last edited by

            @Christoph-Hart Thank you, I'll play around with it this afternoon.

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            1 Reply Last reply Reply Quote 0
            • ustk
              ustk last edited by

              I needed this to be unidirectional for now so all good. Because when you add child panels to a list, sometimes (although not always) the viewport was following the incrementing list which is rarely the behavior you want. So setting it back to 0 pos when reconstructing the list is cool. I was using a trick for this before having a method.

              Tired to press F5 in the forum...
              Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

              1 Reply Last reply Reply Quote 0
              • d.healey
                d.healey @Christoph Hart last edited by

                @Christoph-Hart Yep this works perfectly!

                Libre Wave - Freedom respecting instruments and effects
                My Patreon - HISE tutorials
                YouTube Channel - Public HISE tutorials

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post

                13
                Online

                813
                Users

                5.6k
                Topics

                52.0k
                Posts