-
User Control Properties and Arrays/Collections of User-Defined Types
Hello Everybody--
I am creating an ActiveX control. One part of this control is an indexed
list of
a user-defined type.
I want my control to be able to access and change a property of one item
on this
list. My Get Property works fine, but I cannot figure out how to do a Let
(or
Set?) Property.
For example, I want to be able to, from a form using my control, do something
like:
UserControl1.List(Index).Color = vbRed
How do I do this? Any ideas or links to code would be much appreciated.
Thanks,
G72
-
Re: User Control Properties and Arrays/Collections of User-Defined Types
Hi Gates --
If I understand, you'd do something like this:
Public Property Let List(ByVal Index As Long, ByVal ColorValue As Long)
' Whatever
End Property
Public Property Get List(ByVal Index As Long) As Long
' Eh
End Property
This isn't working?
Later... Karl
--
http://www.mvps.org/vb
"Gates Seventytoo" <gates72@yahoo.com> wrote in message
news:3a2e9fab$1@news.devx.com...
>
> Hello Everybody--
>
> I am creating an ActiveX control. One part of this control is an indexed
> list of
> a user-defined type.
>
> I want my control to be able to access and change a property of one item
> on this
> list. My Get Property works fine, but I cannot figure out how to do a Let
> (or
> Set?) Property.
>
> For example, I want to be able to, from a form using my control, do something
>
> like:
> UserControl1.List(Index).Color = vbRed
>
> How do I do this? Any ideas or links to code would be much appreciated.
>
> Thanks,
> G72
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|