Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Name in Textbox
Message
From
08/12/2004 09:41:06
 
General information
Forum:
ASP.NET
Category:
Forms
Title:
Miscellaneous
Thread ID:
00967443
Message ID:
00967727
Views:
18
Stephane,

Yeah, I agree with you on the VB. <g> I just copied Eric's code and took out the unncessary stuff (and didn't notice that it needed that extra line that you added). If I had posted it myself, I would have posted C# code. =)

~~Bonnie



>Thank-you to both of you, it works, but i just added an important line of code:
>
>
>public class MyTextBox : System.Windows.Forms.TextBox
>{
>
>	protected override void OnTextChanged(System.EventArgs e)
>	{
>		if (this.Text.Length == 0)
>		{
>			if (this.DesignMode)
>				this.Text = this.Name;
>			else
>				base.OnTextChanged(e);
>		
>		}
>	}
>}
>
>
>Sorry, i can't write in VB. I couldn't teach myself to write "Me".something ;)
>
>Stephane
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform