7 Replies - 513 Views - Last Post: 16 October 2013 - 02:21 PM Rate Topic: -----

#1 bengie  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 94
  • Joined: 12-October 13

How can I create an object inside a groupbox

Posted 16 October 2013 - 02:04 PM

Basically I have this code to generate an object:

Dim richtextbox1 As RichTextBox
Dim x As Integer
Dim y As Integer

x = x + 100

richtextbox1 = New RichTextBox
richtextbox1.Text = ""
richtextbox1.Multiline = True
richtextbox1.Left = x - 75
richtextbox1.Top = 25
richtextbox1.BackColor = Color.LightYellow
Controls.Add(richtextbox1)
richtextbox1.Width = 100
richtextbox1.Height = 100


But i need it to generate the object inside a groupbox,

Thanks in advance :)

Is This A Good Question/Topic? 0
  • +

Replies To: How can I create an object inside a groupbox

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9568
  • View blog
  • Posts: 36,222
  • Joined: 12-June 08

Re: How can I create an object inside a groupbox

Posted 16 October 2013 - 02:06 PM

What sort of object?
Was This Post Helpful? 1
  • +
  • -

#3 bengie  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 94
  • Joined: 12-October 13

Re: How can I create an object inside a groupbox

Posted 16 October 2013 - 02:09 PM

A richtextbox
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9568
  • View blog
  • Posts: 36,222
  • Joined: 12-June 08

Re: How can I create an object inside a groupbox

Posted 16 October 2013 - 02:13 PM

Ah.. gotcha.. a richtextbox into a groupbox.

Most of the GUI objects have a ".controls" (similar to how you are using it in the code above). Why not use that (of the groupbox) and add it?
Was This Post Helpful? 1
  • +
  • -

#5 bengie  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 94
  • Joined: 12-October 13

Re: How can I create an object inside a groupbox

Posted 16 October 2013 - 02:14 PM

Might sound stupid, but how do I do that :/
Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9568
  • View blog
  • Posts: 36,222
  • Joined: 12-June 08

Re: How can I create an object inside a groupbox

Posted 16 October 2013 - 02:16 PM

Controls.Add(richtextbox1)

That line.. you are adding a richtextbox object to the form, right? If you want to add a richtextbox to a groupbox.. perhaps look in that groupbox's options for that controls.add... and follow suit.
Was This Post Helpful? 1
  • +
  • -

#7 bengie  Icon User is offline

  • D.I.C Head

Reputation: -1
  • View blog
  • Posts: 94
  • Joined: 12-October 13

Re: How can I create an object inside a groupbox

Posted 16 October 2013 - 02:17 PM

Dont worry about it, i got it. Thanks so much for your help :D

sorry i posted that afterwards :)
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9568
  • View blog
  • Posts: 36,222
  • Joined: 12-June 08

Re: How can I create an object inside a groupbox

Posted 16 October 2013 - 02:21 PM

No prob.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1