I have done some dynamically textboxes and dont want them to appear outside of the form.

  • Thread starter Thread starter Carlo Goretti
  • Start date Start date
C

Carlo Goretti

Guest
I have done some dynamically textboxes. The problem is that when this textboxes appear. It changes a buttons location and then the button appears outside the form
Here is my code! It dosent work right now..

if (CreateBtn.Location.Y + CreateBtn.Height < textBoxes.Location.Y + textBoxes.Height || CreateBtn.Location.Y + CreateBtn.Height < textBoxes2.Location.Y + textBoxes2.Height)
{
CreateBtn.Location = new Point(CreateBtn.Location.X, textBoxes.Location.Y + textBoxes.Height + 15);
}
if (Location.Y + Height < CreateBtn.Location.Y + CreateBtn.Height)
{
Height = CreateBtn.Location.Y + CreateBtn.Height + 50;
}

Continue reading...
 
Back
Top