Adding a value to a system enumeration

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Per Rollvang

    #1

    Adding a value to a system enumeration

    Hi All!

    I am creating a usercontrol, and this control have some text that can be
    placed on the control via the enumeration "ContentAlignme nt". 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
    ContentAlignmen t-enumeration.

    Is this possible? How?

    TIA
    regards, Per Rollvang


  • Mythran

    #2
    Re: Adding a value to a system enumeration



    "Per Rollvang" <perrollvang(at )hotmail.comwro te in message
    news:OMC9hb6cHH A.4388@TK2MSFTN GP05.phx.gbl...
    Hi All!
    >
    I am creating a usercontrol, and this control have some text that can be
    placed on the control via the enumeration "ContentAlignme nt". 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
    ContentAlignmen t-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 ContentAlignmen t enumeration (if you control the
    propert(y)(ies) ).

    HTH,
    Mythran


    Comment

    Working...