PDA

Click to See Complete Forum and Search --> : How to create a new property for the Column Object?


Lunsford
Aug 29th, 2002, 05:36 PM
I am trying to design an active x control.
On the UserControl workspace I put a DataGrid control.
I know how to create a new property for my active x control using the following code:

Public Enum OptionNumber
One
Two
Three
End Enum

Dim mPropertyName As OptionNumber

Public Property Get PropertyName() As OptionNumber
PropertyName = mPropertyName
End Property

Public Property Let PropertyName(ByVal NewPropertyName As OptionNumber)
mPropertyName = NewPropertyName
PropertyChanged PropertyName
End Property

Using this code you access the new property this way:
NewDataGrid.NewProperty (NewDataGrid being the name of my active x control)

But this is not what I want.
I want to create a new property for the column object of the DataGrid,
but I am not sure how to do it.

I need to access the property like this:
NewDataGrid.Column(0).NewProperty

I need to know how or where to write the property procedures
so that VB knows that the new property belongs to the column object
(NewDataGrid.Coloumn(0).NewProperty)
and NOT to the new active x control I am trying to build
(NewDataGrid.NewProperty).

Can anyone help me with this?