Results 1 to 2 of 2

Thread: [2005] limit values for control property

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    17

    [2005] limit values for control property

    Alright, I'm sorry if I don't really explain this very clearly, but you know how one of the properties of a label is AutoSize, and there's a drop down box that lets you pick between true and false, and you can't type in your own options or anything? Well I'm creating a control, and I was wondering how I could add a property with only two options like that. I know how I could create a property that checks to make sure whether it is one of those two values or not and returns an error if it's not, but how could I make a property have a drop-down box like that?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    105,433

    Re: [2005] limit values for control property

    I can't tell you the exact answer to your question, but I can tell you that you use attributes to control the design-time behaviour of your types. You should take a look at the help/MSDN topic for the System.ComponentModel namespace as it contains all the attribute classes that control that sort of thing. I've got a feeling that it is the DesignerAttribute class that you want but I could be quite wrong about that. You should probably also look through some of the results of the following MSDN search:

    http://search.msdn.microsoft.com/sea...&c=4&s=1&swc=4

Posting Permissions

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



Click Here to Expand Forum to Full Width