Previous Thread:   Invisible Event

1/4/2006 11:40:02 AM    UiTypeEditor for Text
I've noticed that in .NET 2005 there's a Text UITypeEditor, for controls that  
  
have the Text property (for example, the Label control). Is there a public  
  
class for this editor, that I can use?  
  
--  
  
Avi  
  
American Society of Composers Authors and Publishers  
  
New York, NY



1/5/2006 1:19:26 AM    RE: UiTypeEditor for Text
Hi Avi,  
  
Thanks for your post.  
  
I am not sure which UITypeEditor you are referring, based on my experience,  
  
the Text property(string type) of the controls in .Net2.0 will not  
  
associate with any UITypeEditor. At least, I can confirm that Label.Text  
  
property does not have any UITypeEditor with it.  
  
So can you be a little more accurate about which UITypeEditor on which  
  
Control's property you are interested in? Thanks  
  
Best regards,  
  
Jeffrey Tan  
  
Microsoft Online Partner Support  
  
Get Secure! - www.microsoft.com/security  
  
This posting is provided "as is" with no warranties and confers no rights.

1/5/2006 2:56:54 AM    RE: UiTypeEditor for Text
Hi Avi,  
  
Thanks for your feedback.  
  
Oh, yes, you are right. It seems that I am not familiar with the newer  
  
version of Reflector. Actually, I usually use Reflector to view the source  
  
code of .Net controls, while the original version of Reflector will show  
  
the property attribute in the left panel, but the lastest updated version I  
  
am current using is not showing the attributes in the left panel now.  
  
With a little deeper insight into Label.Text property, yes, .Net2.0  
  
associates MultilineStringEditor with this property. MultilineStringEditor  
  
is a public avaiable FCL class, which Displays a dialog for editing  
  
multi-line strings in design mode. So for String type property, you can  
  
reuse this class like this:  
  
[Editor(typeof(System.ComponentModel.Design.MultilineStringEditor),  
  
typeof(UITypeEditor))]  
  
public override string StringProp  
  
{  
  
get  
  
{  
  
return base.StringProp;  
  
}  
  
set  
  
{  
  
base.StringProp= value;  
  
}  
  
}  
  
Hope it helps  
  
Best regards,  
  
Jeffrey Tan  
  
Microsoft Online Partner Support  
  
Get Secure! - www.microsoft.com/security  
  
This posting is provided "as is" with no warranties and confers no rights.

1/6/2006 1:15:32 AM    RE: UiTypeEditor for Text
I am glad my reply can help you. If you need further help, please feel free  
  
to tell me, thanks  
  
Best regards,  
  
Jeffrey Tan  
  
Microsoft Online Partner Support  
  
Get Secure! - www.microsoft.com/security  
  
This posting is provided "as is" with no warranties and confers no rights.

1/23/2006 12:49:13 PM    Re: UiTypeEditor for Text
How would that look in VB.NET  
  
[Editor(typeof(System.ComponentModel.Design.MultilineStringEditor),  
  
typeof(UITypeEditor))]  
  
TIA  
  
""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message  
  
news:pt6J56lEGHA.832@TK2MSFTNGXA02.phx.gbl...