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. FlowLayoutPanel and ScrollPositions

FlowLayoutPanel and ScrollPositions

Scheduled Pinned Locked Moved C#
winformsquestion
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.
  • Z Offline
    Z Offline
    zaboboa
    wrote on last edited by
    #1

    Hello, I have a FlowLayoutPanel that I populate with my user controls. I have approximatelly 20 controls in the flowpanel. If I select a specific control programatically, and then scroll to it programatically using the statement: this.flowPanel.ScrollControlIntoView (myControl) However, the scrolling will stop the moment control is fully visible, and that makes control appear on the right side of the flowpanel. What I want to do, is for the flowpanel to scroll enough for the myControl to line up with the left edge of the flow panel. Is there a way about it, like setting certain properties? Thank you very much.

    J 1 Reply Last reply
    0
    • Z zaboboa

      Hello, I have a FlowLayoutPanel that I populate with my user controls. I have approximatelly 20 controls in the flowpanel. If I select a specific control programatically, and then scroll to it programatically using the statement: this.flowPanel.ScrollControlIntoView (myControl) However, the scrolling will stop the moment control is fully visible, and that makes control appear on the right side of the flowpanel. What I want to do, is for the flowpanel to scroll enough for the myControl to line up with the left edge of the flow panel. Is there a way about it, like setting certain properties? Thank you very much.

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Could you temporarily set the width of myControl to flowPanel.Width, call ScrollControlIntoView, then reset the width of myControl back to normal?

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Trekkie love The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      Z 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        Could you temporarily set the width of myControl to flowPanel.Width, call ScrollControlIntoView, then reset the width of myControl back to normal?

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Trekkie love The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        Z Offline
        Z Offline
        zaboboa
        wrote on last edited by
        #3

        Thank you It works, the problem, you notice a bit of blinking withing the control. I guess it's due to myControl changing size.

        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