Help! How do I hide or override property/category display under webcontrols?

L

lavey

greetings everyone,

I have search throughout the net but still no luck... ok what I am facing
here is that...
how do I hide or override property/category display under webcontrols?

do I have to hardcode it myself just like the following codes? cos but
default, there's lot of properties to override.
and also.. its there a direct method to hide certain category?
[Bindable(true),Category("Appearance"),Browsable(false)]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}


please advise,
Nigil
 
H

HD

if you have too many properties to over ride and a few to use, i would
suggest inheriting from control instead of webcontrol.
Which means you dont get any and you just start adding whatever you need.
 
N

Nigil LaVey

Hi HD,

Thanks man.. u saved me lots of codings.. thanks
one more thing... can I set the order of the property?
say like

TestColor
BorderColor

instead of
BorderColor
TestColor

cos by default it just order by Alphabetical

public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}

public override System.Drawing.Color TestColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}



regards,
Nigil


HD said:
if you have too many properties to over ride and a few to use, i would
suggest inheriting from control instead of webcontrol.
Which means you dont get any and you just start adding whatever you need.

lavey said:
greetings everyone,

I have search throughout the net but still no luck... ok what I am facing
here is that...
how do I hide or override property/category display under webcontrols?

do I have to hardcode it myself just like the following codes? cos but
default, there's lot of properties to override.
and also.. its there a direct method to hide certain category?
[Bindable(true),Category("Appearance"),Browsable(false)]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}


please advise,
Nigil
 
H

HD

hello Nigil,

Not sure about that. You could try binding them to say a category. That
would help position 'em in group but they will still be show in A->Z format
in property box. Dont think there's a parameter in the Bindable attribute
construct. Sorry bout that

Regards,

HD
Nigil LaVey said:
Hi HD,

Thanks man.. u saved me lots of codings.. thanks
one more thing... can I set the order of the property?
say like

TestColor
BorderColor

instead of
BorderColor
TestColor

cos by default it just order by Alphabetical

public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}

public override System.Drawing.Color TestColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}



regards,
Nigil


HD said:
if you have too many properties to over ride and a few to use, i would
suggest inheriting from control instead of webcontrol.
Which means you dont get any and you just start adding whatever you need.

lavey said:
greetings everyone,

I have search throughout the net but still no luck... ok what I am facing
here is that...
how do I hide or override property/category display under webcontrols?

do I have to hardcode it myself just like the following codes? cos but
default, there's lot of properties to override.
and also.. its there a direct method to hide certain category?
[Bindable(true),Category("Appearance"),Browsable(false)]
public override System.Drawing.Color BorderColor
{
get
{
return base.BorderColor;
}
set
{
base.BorderColor = value;
}
}


please advise,
Nigil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top