Load on controls on groupbox

sethindeed

Centurion
Joined
Dec 31, 1969
Messages
118
Location
Montreal Canada
Anybody knows how to load a control on a groupbox, so that I can refer correctly to the left and top property ?

I know all the code about loading controls from classes, I just need to be able to load it on a groupbox.

thx
 
I'm not sure I understand what you mean to "load" the control
on to the GroupBox. To add a control to a GroupBox, create a
control, set its properties, and then add it to the GroupBox's
Controls collection.

Visual Basic:
Dim newTextBox As New TextBox()

' Set the newTextBox's size, text, and position properties here

theGroupBox.Controls.Add(newTextBox)
 
The following works for me (in the Form's load event):
C#:
ComboBox o = new ComboBox();
o.Location = new Point(0, 0);
groupBox1.Controls.Add(o);

Can you show us your code?

-Ner
 
Back
Top