DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Gates Seventytoo Guest

    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


  2. #2
    Karl E. Peterson Guest

    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
    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links