views:

27

answers:

1

I create some control and i define some properties who can define in desing time, but only shows one. Another issue is that in the one shown, the textbox of the form was displayed, but i can't select any.

    [Description("Blah Blah Blah"),
    Category("Data"),            
    DefaultValueAttribute(typeof(TextBox), null),
    Browsable(true)]
    //Only show this one
    public TextBox textBox
    {
        set { txt = value;}
    }


    [Description("Blah blah blah again"),
    Category("Data"),
    DefaultValueAttribute(typeof(string), null),
    Browsable(true)]
    public string Mensaje
    {
        set { sMensaje = value; }
    }

so, what's wrong with my code

+2  A: 

Your properties are missing getters.

// Snip attributes
public TextBox textBox
{
    get { return txt; }
    set { txt = value;}
}

// Snip attributes
public string Mensaje
{
    get { return sMensaje; }
    set { sMensaje = value; }
}
Aaronaught