Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21340

[RESOLVED] User control property mapping issue

$
0
0
I've been working on an extended text box control and so far so good but having an issue with the multiline property

Here are the related code segments
Code:

' WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
' MappingInfo=Text1,Text1,-1,MultiLine
Public Property Get MultiLine() As Boolean
    MultiLine = Text1.MultiLine
End Property
Public Property Let MultiLine(ByVal Value As Boolean)
    Text1.MultiLine = Value
    PropertyChanged "MultiLine"
End Property

Code:

    Text1.MultiLine = PropBag.ReadProperty("MultiLine", False)
Code:

    Call PropBag.WriteProperty("MultiLine", Text1.MultiLine, False)
When I try to use the control I get an error here
Code:

Text1.MultiLine = PropBag.ReadProperty("MultiLine", False)
Can't assign to read only property

Originally was mapped in the control wizard and did not have the Let, Read and Write entries and also did not show Multiline in the properties window when the control was added to the form

Am I doing something wrong here or is this property not one I can use in my control?

I need to have a way to toggle the multiline on or off in the IDE when the control is added to a form. ??

Viewing all articles
Browse latest Browse all 21340

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>