473,239 Members | 1,482 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,239 software developers and data experts.

Browsable property not in Properties window

I cannot see a browsable property I have added in the Properties
Window. Using C++ in Visual Studio .NET 2003 I have added a property to
my managed class:

[Description(S"My description")]
__property int get_Foobar() { return m_foobar; }
__property void set_Foobar(int value) { m_foobar = value; }
int m_foobar;

My understanding from the docs is that I should see "Foobar" show up on
the properties for this class.

This class is a service inheriting from
System::ServiceProcess::ServiceBase. I go to the "MyService.h [Design]"
view, right click on the designer background and select properties. I
see inherited properties like "CanShutdown" and "CanStop" but I do not
see the category I defined ("MyCategory") nor the property I have made
browsable ("Foobar"). I even check to make sure I have set the
Browsable attribute correctly:
AttributeCollection* attributes =
TypeDescriptor::GetAttributes( __box(Foobar));
EventLog::WriteEntry(S"MyService", S"Foobar is browsable");
EventLog::WriteEntry(S"MyService", S"Foobar is not browsable");
I indeed see "Foobar is browsable" in the Event Viewer for my service
so I conclude that I have successfully defined my property and set the
browsable attribute to true. So why can't I see the property in the
Properties window?

This is important because I want to make some properties dynamic so
they can be configured through the XML .config file thus making my
service easily configurable without a recompile. The only way I know
how to do this is to get the property visible in the Properties window
and then go to "(DynamicProperties)", click on the "..." and check
properties that I want to show up in the .config file. This works great
as long as the property is actually listed in the Properties window. If
there is an alternative way to mark my properties as dynamic that would
also solve my problem.

Stephen W. Carson
Dirxion Software

Nov 17 '05 #1
0 1560

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Ken | last post by:
Hi. I've defined a custom database property called Version. It is a text value. I wanted to know if there is a way to include that value on the title bar of a form window. Also, is there a...
by: james | last post by:
I cannot get my UserControl's browsable properties to show up in the designer properties panel. I have then public virtual bool TestProp { {get return testProp; } set { testProp = value; } } ...
by: DS | last post by:
I've got a user control called SearchInline that has a few protected properties, for example: protected string SpName { get .. set.. } I then create another user control called SearchAgent for...
by: Flix | last post by:
When I extend a Control and I want to hide a property at design time, I do: public class MyButton : Button { public new System.String Text { get{return base.Text;} set{base.Text=value;} }
by: Beeeeeeeeeeeeves | last post by:
If I put the browsable attribute on a property of a component, it makes it appear in the properties browser for instances of that component. But does this only apply to properties, or can I do it...
by: Tom | last post by:
I'm using the PropertyGrid, and have it bound to a class object. Works fine - however, I have some properties that I want to show up on the grid (i.e. they are browsable) -YET- I don't want the...
by: Alli | last post by:
I have a web user control with a property that has the browsable attribute set to true, but property doesn't show up in the HTML design property window when I add the control to a web form. My...
by: mpar16 | last post by:
Hi i needed help me to retrieve properties of a control, i got a scenario to read all available properties and its current assigned values for different controls in project. i tried with...
by: mzwilli | last post by:
Hi, I'm trying to create browsable DataSource and DataMember properties on a user control. The idea is to create a descendent object, place a dataset then specify the DataSource (DataSet) and...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.