Why does the text property overridden in user control is not showing at design time

后端 未结 2 2076
Happy的楠姐
Happy的楠姐 2021-02-13 14:04

I have a usercontrol which overrides the property Text. But this property is not shown at design time.

If I rename it to caption or value it is shown in properties at de

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-13 14:41

    Added following attributes and the problem is solved.

         _
         _
         _
         _
        Public Overrides Property Text() As String
            Get
                Return lblText.Text
            End Get
            Set(ByVal value As String)
                lblText.Text = value
            End Set
        End Property
    

提交回复
热议问题