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 / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

Problem with Browsable Properties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mzwilli - 14 Mar 2008 20:03 GMT
Hi, Thanks in advance for looking at this issue!

I am having a Problem with Browsable Properties, as follows:
1. I have an ancestor user control with browsable properties.
2. I create a descendant object and set the properties through the
designer, as expected.
3. I place an instance of the descendant object on a container object
as a control.

Sometimes the browsable properties on the descendent control get set
to null by the container object.

I really do not want the browsable properties to be modified or even
assessible by the container form.

Any Advice?
Marc Gravell - 14 Mar 2008 21:52 GMT
You could try marking the property with [ReadOnly(true)] - as far as
most bindings are concerned this will make it read-only, but you can
still set the value via code.
Marc Zwillinger - 15 Mar 2008 00:48 GMT
Thanks for the information - I tried it - but I want to be able to set the
attributes from the designer.

Essentially, I'd the property should be browsable in descendent objects but
not overriden when placing a descendent object on a container object.

Currently the browsable attributes are sometimes auto-overriden and set to
null.

> You could try marking the property with [ReadOnly(true)] - as far as
> most bindings are concerned this will make it read-only, but you can
> still set the value via code.
Marc Gravell - 15 Mar 2008 10:35 GMT
OK - I'm struggling to understand what you are describing - is it
possible to post something that demonstrates this?

Marc
Marc Zwillinger - 15 Mar 2008 16:45 GMT
Hi and Thanks for looking.

The problem is periodic thus difficult to debug or reproduce.

Essentially I've created browsable attributes on an object.  The idea is to
create descendant objects then set the attributes using the designer (not
code).

When the objects are ultimately placed in a container object (drag over from
the toolbox) these browsable attributes are sometimes overridden with null
(generated code).

This ends up causing problems down-stream...

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.