CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Posts
    159

    Limit the value of a property in Toolbox

    Hi all,

    somehow it is possible to limit the value of a property in the toolbox. For example if one tries to enter a negative number for tabindex you get a message.

    I am interested in using this feature but can not find how to do this. Is there a special attribute or trick for this?

    thx,
    Jef

  2. #2
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Limit the value of a property in Toolbox

    Inherit from the control and limit the properties as needed.
    If you liked my post go ahead and give me an upvote so that my epee.... ahem, reputation will grow.

    Yes; I have a blog too - http://the-angry-gorilla.com/

  3. #3
    Join Date
    Nov 2005
    Posts
    159

    Re: Limit the value of a property in Toolbox

    Well, my question remains: how can the limiting be done? Normally I use exceptions but this does not work for the designer is there some other trick?

    thank you, Jef

  4. #4
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Limit the value of a property in Toolbox

    I think you have to use your own type converter for the property, but easier way could exist.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

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

Featured