In c# I have a dynamic control on my flowlayoutpanel. I want another control to be placed exactly after the 1st control on the click of a button.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The way i would do this is to store the height of the control in a global variable then each time you add a control add another lot of its height to it. This gives you the amount that you need to move the location down by each time to get the control to appear below.
Then on the button click event i would create a new control and set the location by using a New drawing.point and setting the X parameter to the current X location of the control and then the Y parameter to the global variable.