Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / December 2004

Tip: Looking for answers? Try searching our database.

Browsable Attribute

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Thiruppathi S - 31 Dec 2004 08:52 GMT
Hi All,

Could any body plz help me.
I want to set the browsable attribute value of "property2 " according  to
the value of "property1"

i could able to change the value of that property but not the attribute

plz help me

Regards

S.Thiruppathi,
John Saunders - 31 Dec 2004 17:23 GMT
> Hi All,
>
[quoted text clipped - 3 lines]
>
> i could able to change the value of that property but not the attribute

Attributes are compile-time things, mostly, so you can't easily do this.
Also, I can't think of an example of a component or control which hides one
property based on the value of another property.

You can throw an exception in the property setter for property2 based on the
value of property1.

Also, if you create a designer for your component, you can override the
PostFilterProperties method to replace the normal "property2" property
setter and replace it either with one that has Browsable(false), or, for
instance, with one which is read-only.

John Saunders

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.