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 6128651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:39:03+00:00 2026-05-23T16:39:03+00:00

I have a panel and a button that adds text boxes to the panel

  • 0

I have a panel and a button that adds text boxes to the panel in the following configuration:

| textbox1 |

| textbox2 |

etc.
The vertical width of each textbox is 27 so what I do is keep track of a y-coordinate and add 30 to it every time I make a new textbox, and put the textbox at that y coordinate. The problem is that after a few textboxes a scrollbar appears, and when I add a new textbox, the origin is taken to be at the top left corner of the visible portion of the panel, not the top left corner of the complete panel. This results in a lot of space between some textboxes. Can anyone help me fix this? Thank you.

  • 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-23T16:39:04+00:00Added an answer on May 23, 2026 at 4:39 pm

    I would use a FlowLayoutPanel instead. Then you could just add your textboxes by doing flowLayoutPanel1.Controls.Add(mytextbox1);

    The other option is explained in this post.

    Another example is Setting position of a control doesn’t seem to work when scroll is ‘moved’

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

Sidebar

Related Questions

I have a stack panel inside of an expander panel that I programaticaly adds
I have a dynamically created button that is being added to an update panel
I have code in an Update Panel and even though on a button click
I have an Panel control that I need to maintain position across postbacks. I
i have a flow panel that i'm adding extra items to it at runtime
I have a Java swing application with a panel that contains three JComboBoxe s
I have a custom component that extends a panel. The panel has a top
I have a program that adds LineItems to a ZedGraph pane whenever data parameters
i have a panel having slide toggle effect on click of a button along
I have a project that adds elements to an AutoCad drawing. I noticed that

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.