Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4125696
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:54:13+00:00 2026-05-20T23:54:13+00:00

I am using a Panel to hold a list of controls (user-defined). The way

  • 0

I am using a Panel to hold a list of controls (user-defined). The way that I add the panels, I am setting the location of the control based on the Panel.Controls.Count before I add it to the panel.

comRec.Location = new Point(comRec.Location.X, panel1.Controls.Count * 25);
panel1.Controls.Add(comRec);

Now, this works nicely and looks exactly the way that I want it to. However, once we reach the limit on the window, the AutoScroll enables (which I do want). Now, if the user were to scroll to the bottom of the Panel, this ultimately changes the location of every control in the panel. Instead of my first comRec.Location being (0,0), it is something like (0,-219). So now, when the user adds another comRec object, it creates a HUGE gap between the objects.

My question is this, what is the best way to account for the changes of the location with the scrollbar and still using my adding system. I am assuming that will have to do something with checking the value of the scrollbar and using it to determine the location.

Also, is there a BETTER way to display a list of controls? Should I be using a Panel?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:54:14+00:00Added an answer on May 20, 2026 at 11:54 pm

    Look at the FlowLayoutPanel control, it’s exactly what you what.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a problem that when I created a customize control using panel and
I am trying to add n image to a panel using Netbeans. I dragged
I am using two update panel..in nested way.. can i use like this and
I'm trying to figure out if there is a way to dynamically add controls
I'm going to build a web hosting control panel using PHP and I want
I am using this sliding top panel using mootools (for orientation, the code is
I am displaying video over panel using custom allocator sample, for some file it
I have two panels: main_panel child_panel The main_panel layout is set using: main_panel.setLayout(flowlayout) I
I'm trying to make a sliding panel using .animate function because I want it
I am simply trying to draw a rectangle inside of a panel using flex4.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.