Controls property in designer

  • Thread starter Thread starter Tom C
  • Start date Start date
T

Tom C

I need to expose a property as a list in the designer properties.
Somthing like

Friend Property MyControlChoice as system.string
get
return me._myControlChoice
end get
set value as system.string
me._myControlChoice = value
end set
end property

But the choices need to be a strong typed list so we can extend it. I
have been digging thru attributes and designer documentation but can't
seem to hit on the right way to make this work. Can anyone possibly
shed any light on what is probably a simple mattter?

Thanks.
 
I need to expose a property as a list in the designer properties.
Somthing like

Friend Property MyControlChoice as system.string
get
return me._myControlChoice
end get
set value as system.string
me._myControlChoice = value
end set
end property

But the choices need to be a strong typed list so we can extend it. I
have been digging thru attributes and designer documentation but can't
seem to hit on the right way to make this work. Can anyone possibly
shed any light on what is probably a simple mattter?

Thanks.

Apparently this is not making sense to anyone. What I trying to do is
show this property from a user control class in the windows designer
properties window with a dynamic list in the combobox based on the
type of window that owns the user control.

Does that help anyone help me?
 
Tom C wrote:
What I trying to do is
show this property from a user control class in the windows designer
properties window with a dynamic list in the combobox based on the
type of window that owns the user control.
<snip>

Doesn't a public enum exposed by the control would do?

<aircode>
Public Class MyControl
'...
Public Enum Behavior
Unspecified
Good
VeryAttentive
Adulatory
Bad
Disgusting
Unspeakable
End Enum

Public Property ControlBehavior
'...
End Property
'...
</aircode>

This will appear in the property window when you site your control in
a container.

HTH.

Regards,

Branco.
 
Tom C wrote:



<snip>

Doesn't a public enum exposed by the control would do?

<aircode>
Public Class MyControl
'...
Public Enum Behavior
Unspecified
Good
VeryAttentive
Adulatory
Bad
Disgusting
Unspeakable
End Enum

Public Property ControlBehavior
'...
End Property
'...
</aircode>

This will appear in the property window when you site your control in
a container.

HTH.

Regards,

Branco.

I should have stated in my original post that an enum appears to be
too limited. It has no inheritance. At best, it can be shadowed. We do
extensive extending of our application for specific clients and the
enum is simply not robust enough. I guess I will take this matter to
the designer forum.
 
Back
Top