Emilie

Emilie

  • NA
  • 14
  • 0

User Control Width Hell!

May 17 2008 8:33 PM
Hi there,

I created a user control that contains basically a multiline textbox and a button to the right of that textbox.
The main form is created with one of these user controls on it. Clicking on the user control's button adds another same user control below it, etc.
The events and all the logic is good, but I have a display problem.
The first user control that is displayed when the main form is loaded is truncated on the right hand side. So I do not see my button. Using the tab key I can reach it and "click" on it. That adds my second user control and there the sizing is good and I see my button.
I do not have a single like of code that would change the size of anything inside that user control.
I only call the Offset() function to make sure that I do not display the user controls one on top of the other, that's pretty much it.
Why is my first user control behaving differently in the layout than the subsequent ones?

Answers (1)