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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:31:04+00:00 2026-06-12T13:31:04+00:00

So I am trying to add a UserControl to a windows form, however I

  • 0

So I am trying to add a UserControl to a windows form, however I want to add it in a variable location when a button is clicked.

So I have a groupbox in one location and I want the first one to go to the extreme left directly under the groupbox, I then want the next one to be in a position relative to the first, and all subsequent ones to be in a position in relation to the one before. However with restricted space a new line of these controls would have to be eventually created.

I am not sure if this is possible, or how I would do it. Currently I only know how to define a specific point for the control to be created at.

The only part of the code that really matters:

private void addpilot_Click(object sender, EventArgs e)
{
    PilotControl newPilot = new PilotControl();
    newPilot.Location = new Point();
    this.Controls.Add (newPilot);
}
  • 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-06-12T13:31:05+00:00Added an answer on June 12, 2026 at 1:31 pm

    I think that this behavior could be similar to a WrapPanel. If it is not, you may try to solve this using another Panel, or also, implementing your own panel to create an specific location behavior.
    Try seen Panels Overview in the MSDN.

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

Sidebar

Related Questions

I'm trying to add a Usercontrol to a form. The UserControl is in a
As a short term solution I'm trying to jam a windows form 'usercontrol' into
I have two resource dictionaries and trying to add in <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary
I am trying to add vertical and horizontal scrollbars to my UserControl with the
I am having some problems trying to add a ValueConverter in my xaml usercontrol:
I have a user control which is 2 RadCombos cascaded. I'm trying to add
Trying to add a 'box' to a form at design time, I looked up
I am trying to add controls to a UserControl dynamically (programatically). I get a
I'm trying to add an overlay effect to my UserControl and I know that's
I am trying to add an instance of UserControl each time on button_click event,

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.