user control

  • Thread starter Thread starter Xavier
  • Start date Start date
X

Xavier

Hi,

When I create a user control textbox (like "public class mytextbox :
textbox") in C# and use it on another form, properties like font, colors,
etc. are not inherited. Is this behavor normal ? Is there another way to
achieve this ? What I would like is if I change the font type or colors in
my user control, all the other textboxes that are based on it are
automatically changed as well. Also it would be nice to use the WYSIWYG
interface instead of setting them in some method after the initialisation.

thanks for the help
Xavier
 
Hi,

If you inherit from textbox you must have all the properties. Try to
create a class and inherit from textBox :
public class mytextbox : Textbox

You must just create a class and not a user control.

BR


Fabien Decret
Windows Embedded Consulltant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/




Xavier a écrit :
 
Hi,

If you inherit from textbox you must have all the properties. Try to
create a class and inherit from textBox :
public class mytextbox : Textbox

You must just create a class and not a user control.

BR


Fabien Decret
Windows Embedded Consulltant

ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/




Xavier a écrit :
 
Back
Top