Groups | Blog | Home
all groups > dotnet compact framework > december 2006 >

dotnet compact framework : user control


Xavier
12/7/2006 7:06:39 PM
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

Fabien
12/7/2006 11:51:16 PM
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 =E9crit :

[quoted text, click to view]
Fabien
12/7/2006 11:51:22 PM
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 =E9crit :

[quoted text, click to view]
AddThis Social Bookmark Button