Results 1 to 4 of 4

Thread: ActiveX Control Property

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    ActiveX Control Property

    I need to make a property to my ActiveX control that is like the Text propertry for a TextBox (having the Multiline set to True)

    How do I do it ?

    Thanks...

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724
    VB Code:
    1. 'In general declarations
    2. Private m_strText As String
    3.  
    4. Public Property Text() As String
    5.   Text = m_strText
    6. End Property
    7. Public Property Text(ByVal strText As String)
    8.   m_strText = strText
    9.   Text1.Text = strText
    10.   PropertyChanged "Text"
    11. End Property
    12.  
    13. Private Sub UserControl_WriteProperties(PropBag As .....)
    14.   PropBag.WriteProperty "Text", m_strText, vbNullString
    15. End Sub
    16. Private Sub UserControl_ReadProperties(PropBag As ....)
    17.   Text = PropBag.ReadProperty("Text", vbNullString)
    18. End Sub

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803
    ... when Multiline is set to True...

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    You might want to run the ActiveX Wizard, and see if it will come up with the solution for you.

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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