Ich begreifs immernoch nicht so richtig mit den UserControls..

Ich habe ein UserControl, da� aus einem Label (Titel) und einer TextBox besteht ...

Dieses UserControl hat einige "individuelle" Properties
Bspw.:

                [System.ComponentModel.Category("Behavior")]
                public ValidationType Validation
                {
                        get {return _validationType;}
                        set
                        {
                                _validationType = value;
                                this.Invalidate();
                        }
                }
                [Flags]
                public enum ValidationType
                {
                        None            = 0,
                        Text            = 1 << 0,
                        Currency        = 1 << 1,
                        Date            = 1 << 2,
                        Year            = 1 << 3,
                        MonthYear       = 1 << 4,
                        Percentage      = 1 << 5,
                        eMail           = 1 << 6,
                        PLZ                     = 1 << 7
                }
                private ValidationType _validationType;
                [System.ComponentModel.Category("Behavior")]
                public ValidationType Validation
                {
                        get {return _validationType;}
                        set
                        {
                                _validationType = value;
                                this.Invalidate();
                        }
                }

... Soll also u.A. den Validator gleich mitliefern.

Leider geht aber folgendes nicht so richtig:
                [System.ComponentModel.Category("Appearance"), 
System.ComponentModel.Description("The defaulttext
of the textbox.")]
                public override string Text
                {
                        get {return _text;}
                        set
                        {
                                _text = value;
                                this.Invalidate();
                        }
                }

Ich m�chte gerne das Property "Text" im Designer angezeigt bekommen ....
Im WinForm, wo ich das UserControl einsetze kann ich problemlos folgendes schreiben:
myTextBox.Text = "blafasel";

Ich habe aber das Property nicht im Eigenschaftenexplorer von VS ...
Wie muss ich vorgehen?


Zweite Frage w�re dann noch (aber nicht ganz so wichtig):
Ich habe ja Bspw. auch ein Enum drinnen, da� ganz gut funzt. Der einzige Haken daran 
ist jedoch das
"Validation" sollte eine multiselect sein .... Ich hatte gehoft, da� weil das Enum so 
gestaltet ist,
da� ich dann automatisch ein multiselect bekomme ...

Viele viele Fragen ....
Vielleicht wei� jemand Rat.

Mansur

_______________________________________________
CSharp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/csharp.net

Antwort per Email an