Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Programmatically Scroll

Programmatically Scroll

Scheduled Pinned Locked Moved Visual Basic
question
4 Posts 2 Posters 0 Views 1 Watching
  • 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 Offline
    D Offline
    dBrong
    wrote on last edited by
    #1

    I have a Pegasus ImageXview control in a panel. I would like to scroll up/down using the mousewheel. I can receive the wheel events, however I can't seem to move the scroll bar. From my reading, I thought AutoScrollPosition was supposed to be set, but I have had no sucess. Even tried hard coding it. How does one scroll programmatically? How do you detect if you are at the top / bottom of the form?

    T 1 Reply Last reply
    0
    • D dBrong

      I have a Pegasus ImageXview control in a panel. I would like to scroll up/down using the mousewheel. I can receive the wheel events, however I can't seem to move the scroll bar. From my reading, I thought AutoScrollPosition was supposed to be set, but I have had no sucess. Even tried hard coding it. How does one scroll programmatically? How do you detect if you are at the top / bottom of the form?

      T Offline
      T Offline
      Tom Deketelaere
      wrote on last edited by
      #2

      first: a panel has a property 'autoscroll' set this to true maybe it will solve you're problem second: there are 2 controls in vb.net you should look at: hscrollbar and vscrollbar maybe they can be of help if not three: you can try to propramme it by set the panels top bye -= 5 and height bye +=5 or something everytime there is a scroll event but this is far from the best way (and probably has al sorts of problems with it that I can't come up with right now) so my advice try 1 then 2 and if you have ecausted every option go to 3 (only when absalutly no other way)

      D 1 Reply Last reply
      0
      • T Tom Deketelaere

        first: a panel has a property 'autoscroll' set this to true maybe it will solve you're problem second: there are 2 controls in vb.net you should look at: hscrollbar and vscrollbar maybe they can be of help if not three: you can try to propramme it by set the panels top bye -= 5 and height bye +=5 or something everytime there is a scroll event but this is far from the best way (and probably has al sorts of problems with it that I can't come up with right now) so my advice try 1 then 2 and if you have ecausted every option go to 3 (only when absalutly no other way)

        D Offline
        D Offline
        dBrong
        wrote on last edited by
        #3

        The problem was Pegasus - they have the AutoScrollPosition property - but it isn't used. They use their own property called ScrollPosition, setting that works. Go figure?

        T 1 Reply Last reply
        0
        • D dBrong

          The problem was Pegasus - they have the AutoScrollPosition property - but it isn't used. They use their own property called ScrollPosition, setting that works. Go figure?

          T Offline
          T Offline
          Tom Deketelaere
          wrote on last edited by
          #4

          yeah that happens I'm currently working with datawindows control and the calender control of codejock and I ran into several of these 'wtf' moments ;P

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups