SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePοint Troll disgracian's Avatar
    Join Date
    Aug 2006
    Location
    Samsara
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    User control attributes

    Hi all,

    I'm making a custom user control that takes a couple of parameters and was wondering if there is any way of getting Visual Studio 2005 to pop-up a list of allowable values for an attribute in the same way that, for instance "BackColor" will display a popup list of colours.

    Sorry if I haven't explained this very well.

    Cheers,
    D.

  2. #2
    SitePoint Wizard
    Join Date
    Feb 2007
    Posts
    1,274
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure, just make the "parameters" public properties of the class. Make an enum type of the "allowable" values and make sure the property has this type.

  3. #3
    SitePοint Troll disgracian's Avatar
    Join Date
    Aug 2006
    Location
    Samsara
    Posts
    451
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks mate!

    Cheers,
    D.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •