Showing the Enable property on the PropertyBox of an ImageButton type class

A

Andrés Giraldo

Hi!

I created a webcontrol that inherits from an ImageButton, I need to show
the Enable property on the PropertyBox, how can I do that?

Note: The ImageButton doesn't shows the Enable property on the
PropertyBox

Thanks!
 
C

Chris Jackson

That's a job for custom attributes. If you want to display something in the
properties box, you can include (for that method):

[Bindable(true), Category("Appearance"), DefaultValue(""), Description("Show
this puppy?"]
public override bool Enabled {
get {
return base.Enabled;
} set {
base.Enabled = value;
}
}
 
A

Andrés Giraldo

Hi!

Thanks for answer me, but it doesn't work either, I just put this
code...

<System.ComponentModel.Bindable(True),
System.ComponentModel.Category("Appearance"),
System.ComponentModel.DefaultValue(True),
System.ComponentModel.Description("Enabled")> _
Public Overrides Property Enabled() As Boolean
What's missing?
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top