Load on controls on groupbox

sethindeed

Well-known member
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
 
Im 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 GroupBoxs
Controls collection.

Code:
Dim newTextBox As New TextBox()

 Set the newTextBoxs size, text, and position properties here

theGroupBox.Controls.Add(newTextBox)
 
With your solution, all controls displayed properly except for the Comboboxes.
THey just dont show at all even if theyy are loaded.
Any clues ?
 
The following works for me (in the Forms 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