
Complex property won't show in Props Window
I created a complex property for an ActiveX control. The property is
called Seat. I defined a Seat class module with properties Row (a
character) and Column (an integer). So in my control I have
Private m_seat as Seat
Public Property Get Seat() as m_seat
Set Seat = m_seat
PropertyChanged "Seat"
End Property
Public Property Let Seat(s as Seat)
Set m_seat = s
End Property
In InitProperties, I have
Set m_seat = New Seat
In ReadProperties and WriteProperties, I read and write m_seat.Row and
m_seat.Column separately to the property bag using names "Row" and
"Column".
I designed a property page in which to fill in the row and column, and
checked off this page in the PropertyPages property of the user control.
In the Paint event of the user control, I have the seat row and column
written to the control's surface when in design mode.
When I add instances of this control to a form, all of the above works.
What does NOT work is that the Seat property doesn't appear in the
Properties Window. In the user control designer, I went into the property
attributes dialog and set attached the same property page to the Seat
property, but that made no difference. I'm assuming that Seat should show
up just the way, say, Font does on common controls. I thought maybe, just
as the property window displays the value of Font.Name as the current
value of the Font property, my Seat class needed a Name property, so I
created one, but that didn't help.
Any thoughts? Thanks.