all groups > dotnet windows forms designtime > july 2005 >
You're in the

dotnet windows forms designtime

group:

DesignTime bug with usercontrol textbox...workaround?


DesignTime bug with usercontrol textbox...workaround? Robert Conde
7/21/2005 3:48:39 PM
dotnet windows forms designtime: If you place a textbox on a user control...then put that user control on a
form with a panel, then move the control to the panel, you then can activate
the textbox. In other words it no longer thinks it's in designMode. Anybody
know of this issue or a workaround?

Robert Conde

Re: DesignTime bug with usercontrol textbox...workaround? Robert Conde
7/21/2005 8:04:26 PM
I found a workaround, but I don't like it - if someone has a better idea
please tell me. The .NET combo box handles it successfully somehow, but I'm
not sure by what method. Anyhow what I did was the following:

override OnParentChanged()
{
if(DesignMode)
{
Controls.Remove(myTextBox);
Controls.Add(myTextBox);
}
}

[quoted text, click to view]

AddThis Social Bookmark Button