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

    Arrow Setting the browsable attribute dynamically

    What I want to do is set the browsable attribute (component model) of a property programmatically depending on some conditions. The reason for this is because I want to display a object in a propertygrid control sometimes with and sometimes without the property. I tried to override the browsable attribute in the propertydescriptor class, but the browsable attribute is not available there. I'll appreciate any help. Thanks in advance.

  2. #2
    Join Date
    Dec 2003
    Location
    http://map.search.ch/zuerich.en.html
    Posts
    1,074

    Re: Setting the browsable attribute dynamically

    Instead you can associate your own ControlDesigner with your class and override the PreFilterProperties method to add or remove properties viewed in the property grid.
    Useful? Then click on (Rate This Post) at the top of this post.

  3. #3
    Join Date
    Feb 2006
    Posts
    3

    Re: Setting the browsable attribute dynamically

    I need to do it at runtime.

  4. #4
    Join Date
    Dec 2003
    Location
    http://map.search.ch/zuerich.en.html
    Posts
    1,074

    Re: Setting the browsable attribute dynamically

    yes...

    doesn't my solution work?
    Useful? Then click on (Rate This Post) at the top of this 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