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 / Design Time / May 2004

Tip: Looking for answers? Try searching our database.

is it possible to prevent control text property autoassignment on creation in the forms designer?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob - 06 May 2004 22:35 GMT
I have a control whose text property I don't want automatically set on
creation in the forms designer (i.e. "MyUserControl1"), I want this left
blank unless the user specifically puts in a value. Is this possible? I
thought about using a custom serializer, but the only thing I could come up
with would always keep the text property blank.

TIA,
Bob
DRaiko - 07 May 2004 09:38 GMT
Hallo Bob,

look at IComponentChangeServices.ComponentAdded event. You can hook
it in the .Site setter and then your component gets informed that it
is created. Clear the .Text (or set to a different value) in
the event handler (and you can unhook here, since you need
the event no more).

HTH,
Dima.

> I have a control whose text property I don't want automatically set on
> creation in the forms designer (i.e. "MyUserControl1"), I want this left
[quoted text clipped - 4 lines]
> TIA,
> Bob
Bob - 07 May 2004 19:43 GMT
Neat, thank you!

Bob

> Hallo Bob,
>
[quoted text clipped - 15 lines]
> > TIA,
> > Bob
Kent Boogaart - 08 May 2004 04:56 GMT
Hi Bob,

Would you mind posting the relevant portion of your code that achieves this?
I am trying to do a similar thing but am having no luck.

Thanks,
Kent

> Neat, thank you!
>
[quoted text clipped - 22 lines]
> > > TIA,
> > > Bob

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.