user control properties (1 Viewer)

nathansav

Registered User.
Local time
Yesterday, 21:18
Joined
Jul 28, 2010
Messages
114
Hi,

I have added a property to my usercontrol, called NumberOfChildRecords. This property appears when i add the control and view its properties manually. However, i am adding this control by code, and this does not allow me to add this property.

ctlParent = New TreeViewv2.TreeView_Parent

With ctlParent
.Name = "tvw_Parent" & lngParentRow
.Top = 0 + (lngParentRow * intHeight)
.Height = intHeight
.Width = pnlTreeView.Width
.NumberOfChildRecords = rst.recordcount-1
End With

Can anyone advise why i cant seem to add via code.

Thanks.
 

DJkarl

Registered User.
Local time
Yesterday, 23:18
Joined
Mar 16, 2007
Messages
1,028
Is the proerty declared as private? If so try changing it to public.
 

nathansav

Registered User.
Local time
Yesterday, 21:18
Joined
Jul 28, 2010
Messages
114
Hi,

It was because when adding it, i defined ctl, the new control, as a control, rather than dim ctl as new TreeViewv2.TreeView_Parent at the beginning of my code.

Thanks.
 

Users who are viewing this thread

Top Bottom