I have some problems when creating a user control. To give an example to make it clearer questions:


Public Const _Properties As String = "*,Obligatorio=True,Tipo{Class1.*},Tipo2{Class2.*}"
Public Const _IsControl As Boolean = True
Public Const _DrawWith As String = "TextBox"
Private hObs As Observer
Property Obligatorio As Boolean
Private $Obligatorio As Boolean
Property Tipo As String
Private $Tipo As String
Property Tipo2 As Integer
Private $Tipo2 As Integer

Public Sub _new()
hObs = New Observer(Me) As "TextBox" '
Super.background = &FFFFFF&

Public Sub TextBox_GotFocus()
Last.background = &9FFFFF&

Public Sub TextBox_lostFocus()
Last.background = &FFFFFF&
If Me.Obligatorio = True Then
Super.background = &FF0000&
Super.background = &FFFFFF&

Private Function Obligatorio_Read() As Boolean
Return $Obligatorio

Private Sub Obligatorio_Write(Value As Boolean)
$Obligatorio = Value

Private Function Tipo_Read() As String
Return $Tipo

Private Sub Tipo_Write(Value As String)
$Tipo = Value

Private Function Tipo2_Read() As Integer
Return $Tipo2

Private Sub Tipo2_Write(Value As Integer)
$Tipo2 = Value

la Clase Class1:

Public Const Entero As String = "Entero"
Public Const Float As String = "Float"
Public Const Cadena As String = "Cadena"

La Clase Class2:

Public Const Entero As Integer = 0
Public Const Float As Integer = 1
Public Const Cadena As Integer = 2

This code creates a user component that is placed in blue when it receives focus and should be red when
you lose if the property "Obligatorio" is True.

As you can see, by default, this property is True. Although set to True at design time, then at runtime does not catch this value,
take always False. It's like missing code to assign the property values ​​assigned at design time to
property variables.

Nor does it create a property with a list of options. According to the How To:

For properties that take their value into a list of predefined
constants of the same class, you can specify a class instead of a
property kind, with an optional list of constants.
Class . ( * | Constant1 ; Constant2 ; ... ) [ = Default ]
The IDE will will use a ComboBox control to edit the value of the property, and will fill it with the specified constants.

Any idea what I'm doing wrong?

Thanks for your help.