Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

What I don't know keeps me excited...
  • *Experts*
Posted

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.

 

Dim newTextBox As New TextBox()

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

theGroupBox.Controls.Add(newTextBox)

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Posted

With your solution, all controls displayed properly except for the Comboboxes.

THey just don't show at all even if theyy are loaded.

Any clues ?

What I don't know keeps me excited...
  • *Experts*
Posted

The following works for me (in the Form's load event):

ComboBox o = new ComboBox();
o.Location = new Point(0, 0);
groupBox1.Controls.Add(o);

 

Can you show us your code?

 

-Ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...