1
I would like to know how I can place properties within another property, as in the example below.
Example:
I tried to do many times in various ways, but the closest I could was the below represented:
Imports System.Windows.Forms
Imports System.Drawing
Imports System.Drawing.Design
Imports System.ComponentModel
Namespace ClassTest_ParentProperty
Public Class Class_Parent : Inherits Control
Public Property MyProperties_Parent As Class_Child
Public Sub New()
MyBase.BackColor = Color.DarkSlateBlue
End Sub
End Class
Public Class Class_Child
Public Var_MyColor As Color = Color.Empty
Public Var_MyText As New String(Nothing)
Public Var_MySize As New Size(50, 50)
Public Property MyColor As Color
Get
Return Var_MyColor
End Get
Set(value As Color)
Var_MyColor = value
End Set
End Property
Public Property MyText As String
Get
Return Var_MyText
End Get
Set(value As String)
Var_MyText = value
End Set
End Property
Public Property MySize As Size
Get
Return Var_MySize
End Get
Set(value As Size)
Var_MySize = value
End Set
End Property
End Class
End Namespace
But with this attempt I only got what is represented below:
The property that does not expand
I searched for several hours for about 3 days, but I couldn’t find what I wanted. So I hope someone can teach me how to do it.
This does not seem to make any sense, it is probably starting from a wrong premise. The solution to the problem must be very different.
– Maniero
I don’t know if you understood me, but I asked for help to know how I could do what I wanted, I didn’t say the code I put in was right. If you were, you wouldn’t have called for help.
– RJ Seven
What you want doesn’t make sense. Unless it’s not explained correctly
– Maniero