If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Creating custom arrays control

G'day Guys,

I'm currently working on a form in VB.Net 2010 which has a number of controls which are added dynamically at runtime to a panel which sits in a tabcontrol.
The control i'm trying to add is a groupbox with a number of textboxes and labels.
I have been using the following example: http://msdn.microsoft.com/en-us/libr...=vs.71%29.aspx
Where I'm stuck is that I have an Null value error when the form is loading which comes from my control array class.
This error is generated by

Code:

me.list.add(machine_control)

where machine_control is an instance of my custom controls class.
Does anyone have any pointers as to how I can initializes this with values to avoid the NULL value error.

Re: Creating custom arrays control

Re: Creating custom arrays control

Hi HanneSThEGreaT,

The Line of code is in the array control class. the Add_a_machine_grpbox_to_the_list is called called whenever I want to add another custom control

Code:

Public Function Add_a_machine_grpbox_to_the_list()
'Creates a new instance of the custom machine info control class
Dim Machine_Control As Custom_View.Machine_details_box
'Add the custom control to the collections internal list
Me.List.Add(Machine_Control)
'Adds the button to the controls collection of the panelview
HostForm.Controls.Add(Machine_Control)

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.