all groups > dotnet compact framework > october 2006 >
You're in the

dotnet compact framework

group:

Overriding "Text" Property


Overriding "Text" Property Qubeczek
10/31/2006 1:47:41 PM
dotnet compact framework:
Hello,
I have some control delivering form UserControl.

I'd like to hide oryginal property "Text". And I do it.

new public string Text
{
set
{
base.Text = value;
SetAutoSize(AutoSize);
}
get
{
return base.Text;
}
}

But the problem I have, is that this property is not shown in "Properties"
grid during designin form that using my control.
Under desktop .NET it works fine.

I have try attribute:
[System.ComponentModel.EditorBrowsable]
before the property definition, but it dosen't work.

I use the same project for run-time and design-time (couse I don't know, how
to build separate ones).

The question is: how to make may new "Text" property visible and editable in
designer property grid ?
Thanks for help
Qubeczek

Re: Overriding "Text" Property Peter Morris [Droopy eyes software]
10/31/2006 1:51:03 PM
Isn't there a Changed or TextChanged event or something you could plug into
and trigger your code from there instead?

Re: Overriding "Text" Property Qubeczek
10/31/2006 3:05:34 PM

U¿ytkownik "Peter Morris [Droopy eyes software]"
<pete@droopyeyes.no.com.spam> napisa³ w wiadomo¶ci
news:uvZocOP$GHA.4544@TK2MSFTNGP05.phx.gbl...
[quoted text, click to view]

Even if there is something like this,

but for my own proerties there is not any of those events.

There is the global question:
Under desktop .NET 2.0 there is a lot of attributes that allow to manage
user-control behavior in VS 2005 designer (eg. Browsable, Editable, REadOnly
and many others.

How to do the same under .NET CF user-controls ? There is not allowed to use
that atributes, becouse then the code dosen't compile.

But I found the article where there is description how to make design-time
apckage. But I can not reporduce those project.
Can anyone made their own user-control under .NET CF ? If yes - can I please
the sample solution ?

Best regards
Qubeczek

Re: Overriding "Text" Property Qubeczek
10/31/2006 3:07:06 PM
And,
there is mentioned article about design-time controls.

http://msdn2.microsoft.com/en-us/library/aa446505.aspx

But how to reproduce it ?

Best regards
Qubeczek

U¿ytkownik "Qubeczek" <qubeczek@poczta.onet.pl> napisa³ w wiadomo¶ci
news:ei7l7f$ks7$1@news.onet.pl...
[quoted text, click to view]

Re: Overriding "Text" Property Qubeczek
10/31/2006 3:18:49 PM
Hy,

I've found the example, but ...

all this theory is for Visual Studio 7 and .NET 1.1

Eeehhhh....

Have anyone another ideas ?

Thans
Qubeczek

AddThis Social Bookmark Button