.Net Property Grid - Use of NotifyParentProperty

K

Karen

Hi,
I would like to be able to select a text box on a form at runtime
and have a limited set of properties displayed using the .net property
grid. When the properties are updated the text box should be
automatically updated.

I have created a separate class (see code below) and set this as the
selected object when the text box is selected passing in the current
text. However when I update the properties window it doesn't update
the text box even with the RefreshProperties and NotifyParentProperty
attributes set.

Any ideas on this would be greatly appreciated

Karen

//Separate class
using System.ComponentModel;

public class TextBoxSettings
{
public TextBoxSettings(string Value)
{
Text = Value;
}

private string Text;

[CategoryAttribute("Global Settings"),
ReadOnlyAttribute(false),
RefreshProperties(RefreshProperties.All),
NotifyParentProperty(true)]
public string TextValue
{
get { return Text; }
set { Text = value;}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top