Adding a value to a system enumeration

  • Thread starter Thread starter Per Rollvang
  • Start date Start date
P

Per Rollvang

Hi All!

I am creating a usercontrol, and this control have some text that can be
placed on the control via the enumeration "ContentAlignment". I will,
however, give the user a chance to put the text at any coordinates, and
thought it would be nice to add a 'CustomAlign'-member to the
ContentAlignment-enumeration.

Is this possible? How?

TIA
regards, Per Rollvang
 
Per Rollvang said:
Hi All!

I am creating a usercontrol, and this control have some text that can be
placed on the control via the enumeration "ContentAlignment". I will,
however, give the user a chance to put the text at any coordinates, and
thought it would be nice to add a 'CustomAlign'-member to the
ContentAlignment-enumeration.

Is this possible? How?

TIA
regards, Per Rollvang

Since enumerations are not inheritable, you'll basically need to create your
own enumeration and then set the types of the properties to the new
enumeration instead of the ContentAlignment enumeration (if you control the
propert(y)(ies)).

HTH,
Mythran
 
Back
Top