M
Mythran
I have a groupbox I am creating programmatically ... I add textbox controls
to the groupbox. There is a user-defined number of rows and columns for
these textboxes so the groupbox grows in height and width (as does the form)
depending on the total number of textboxes added to the groupbox. My
question is, when I create the GroupBox and TextBox controls, what location
should I place the groupbox onto the form and the textboxes onto the
groupbox?
I see that the Control class has Padding and Margin properties. Usually, if
I see padding, I would set the left of the left-most controls equal to the
padding within the parent control...but for forms, this doesn't seem quite
right. In my development machine, the default left padding for the Form
class is 0 while the default left margin is 3. When I drag a control onto
the form, for testing, it wants to 'snap' into place at the location "12,12"
instead of "0,0". What does the designer use to determine 12,12? Should I
use 12,12 as a hardcoded set of constants or use a property that I am
currently not aware of?
I know, in the long run, this doesn't really matter much for "most"
applications...but would still be good to know
Thanks
Mythran
to the groupbox. There is a user-defined number of rows and columns for
these textboxes so the groupbox grows in height and width (as does the form)
depending on the total number of textboxes added to the groupbox. My
question is, when I create the GroupBox and TextBox controls, what location
should I place the groupbox onto the form and the textboxes onto the
groupbox?
I see that the Control class has Padding and Margin properties. Usually, if
I see padding, I would set the left of the left-most controls equal to the
padding within the parent control...but for forms, this doesn't seem quite
right. In my development machine, the default left padding for the Form
class is 0 while the default left margin is 3. When I drag a control onto
the form, for testing, it wants to 'snap' into place at the location "12,12"
instead of "0,0". What does the designer use to determine 12,12? Should I
use 12,12 as a hardcoded set of constants or use a property that I am
currently not aware of?
I know, in the long run, this doesn't really matter much for "most"
applications...but would still be good to know

Thanks
Mythran