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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:47:41+00:00 2026-06-05T15:47:41+00:00

I have event Button that creates text box in run time. Private Sub Button1_Click(ByVal

  • 0

I have event Button that creates text box in run time.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)       Handles Button1.Click

  Dim textbox1 As New TextBox
  static Dim shiftDown As Integer
  static Dim counter As Integer

  counter += 1
  shiftDown = shiftDown + 30
  textbox1.Name = "Textbox" + counter.ToString()
  textbox1.Size = New Size(170, 10)
  textbox1.Location = New Point(10, 32 + shiftDown)
  textbox1.Visible = True
  GroupBox1.Controls.Add(textbox1)

End Sub

All the text boxes that has been created displayed in GroupBox control dynamically.

My question is how GroupBox control size can be managed according to quantity controls inside it.

  • 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-05T15:47:43+00:00Added an answer on June 5, 2026 at 3:47 pm

    Use the AutoSize and AutoSizeMode property of groupbox.

    Set the AutoSize = true if the GroupBox need to automatically resizes based on its contents; otherwise, false. The default is true.

    Refer the sample to dynamically control the size of GroupBox

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

Sidebar

Related Questions

I am writing an event for button.In that ,i have used swingworker in the
I have a button click event that takes information from controls and enters it
I have a local thread that is started on button-click event from the main
I have button, which fires an event, that deletes a record from the database.
I'm new in .NET programming. I have a class Form1 that includes Button1_Click event.
I have a winform with some buttons that are updated in an event handler.
I have the following code bound to the click event of a button: function
I have MainWindow with a button, under the button click event I want MainWindow
I have a fairly simple code, a button click event, with the first line
I have an asp button with no onclick event but only onclientclick. This call

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.