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. C#
  4. real problem with scrollbars and user control

real problem with scrollbars and user control

Scheduled Pinned Locked Moved C#
helpjavascriptadobetutorialquestion
3 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.
  • A Offline
    A Offline
    Allen Anderson
    wrote on last edited by
    #1

    if you create a user control and add a vertical and horizontal scrollbar. You set the tabstop of both scrollbars to false and set the tabstop of the usercontrol to true. If you hit any arrow keys or pageup/down then the scrollbars flash forever. Even if you force the focus back to the usercontrol (which goes back and forth like 9 times till it gives up) then you still have the arrow key stuck to whatever scrollbar you affected first. what I am trying to figure out is how do you force the scrollbars to %100 ignore the keybaord %100 of the time. I never want the scrollbars to react to the keyboard at all no matter what. However, I want all keys to be handled in the user control. Anyone know how to go about doing this?

    J 1 Reply Last reply
    0
    • A Allen Anderson

      if you create a user control and add a vertical and horizontal scrollbar. You set the tabstop of both scrollbars to false and set the tabstop of the usercontrol to true. If you hit any arrow keys or pageup/down then the scrollbars flash forever. Even if you force the focus back to the usercontrol (which goes back and forth like 9 times till it gives up) then you still have the arrow key stuck to whatever scrollbar you affected first. what I am trying to figure out is how do you force the scrollbars to %100 ignore the keybaord %100 of the time. I never want the scrollbars to react to the keyboard at all no matter what. However, I want all keys to be handled in the user control. Anyone know how to go about doing this?

      J Offline
      J Offline
      J Dunlap
      wrote on last edited by
      #2

      Look into the Autoscroll stuff in .NET. I know it's limited, but it's much easier than trying to make your own scrollable control using scrollbar controls (rather than the built-in window scrollbars).

      "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
      "You must be the change you wish to see in the world." - Mahatma Gandhi

      A 1 Reply Last reply
      0
      • J J Dunlap

        Look into the Autoscroll stuff in .NET. I know it's limited, but it's much easier than trying to make your own scrollable control using scrollbar controls (rather than the built-in window scrollbars).

        "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
        "You must be the change you wish to see in the world." - Mahatma Gandhi

        A Offline
        A Offline
        Allen Anderson
        wrote on last edited by
        #3

        sorry I wasn't clear on my original question. Its not a matter of auto scrolling, its a matter of I need the arrow keys for other things. The fact that scrollbars exist on the usercontrol doesn't mean I want those scrollbars to own the arrow keys.

        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