Results 1 to 2 of 2

Thread: Grouped Properties for Activex

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    4

    Grouped Properties for Activex

    How can add grouped properties for an activex control

    for ex:
    UserCtl.Group1.Prop1 = ""
    UserCtl.Group1.Prop2 = ""
    UserCtl.Group1.Prop3 = ""

    UserCtl.Group2.Prop1 = ""
    UserCtl.Group2.Prop2 = ""


    Any example code would be great

    thanks in advance

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You'd have to make a class and then make an object of the class as a property of the Control.

    VB Code:
    1. 'in class
    2.  
    3. 'although these should be properties not just public variables
    4. Public Name As String
    5. Public Rank As String
    6.  
    7. 'in the control
    8. Private m_Class as Class1
    9.  
    10. 'no let
    11. Public Property Get ClassGroup() As Class1
    12.    Set ClassGroup=m_Class
    13. End Property
    14.  
    15. 'in Initialize
    16. Set m_Class=New Class1
    17.  
    18. 'in Terminate
    19. Set m_Class=Nothing
    20.  
    21. 'then in your app
    22. MyCtrl.ClassGroup.Name="Billy"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width