Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / January 2006

Tip: Looking for answers? Try searching our database.

UiTypeEditor for Text

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
AviD - 04 Jan 2006 19:40 GMT
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?
Signature

Avi
American Society of Composers Authors and Publishers
New York, NY

"Jeffrey Tan[MSFT]" - 05 Jan 2006 01:19 GMT
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
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

AviD - 05 Jan 2006 01:36 GMT
You can populate the Text property of the Label control  (.NET 2.0) in two
ways: the old way, by typing the text into the PropertyGrid. But if you click
on the line you get a nice drop down  box, into which you may enter the text,
even in a multine fashion.
Signature

Avi
American Society of Composers Authors and Publishers
New York, NY

> Hi Avi,
>
[quoted text clipped - 13 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 05 Jan 2006 02:56 GMT
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
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

AviD - 05 Jan 2006 12:55 GMT
Thanks. This is exactly what I meant and needed.
Signature

Avi
American Society of Composers Authors and Publishers
New York, NY

> Hi Avi,
>
[quoted text clipped - 32 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 06 Jan 2006 01:15 GMT
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
Signature

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jon Turner - 23 Jan 2006 17:49 GMT
How would that look in VB.NET

[Editor(typeof(System.ComponentModel.Design.MultilineStringEditor),
typeof(UITypeEditor))]

TIA

>I am glad my reply can help you. If you need further help, please feel free
> to tell me, thanks
[quoted text clipped - 4 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
AviD - 23 Jan 2006 18:27 GMT
   < Editor(GetType(System.ComponentModel.Design.MultilineStringEditor),
GetType(UITypeEditor))> _
   Public Property MyText() As String
   etc.
Signature

Avi
American Society of Composers Authors and Publishers
New York, NY

> How would that look in VB.NET
>
[quoted text clipped - 11 lines]
> > Get Secure! - www.microsoft.com/security
> > This posting is provided "as is" with no warranties and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.