Collection property does not update control

A

--== Alain ==--

Hi,

I have a collection property in my custom control like this one :

[Category("Behavior")]
[Browsable(true)]
[Description("Column Collection")]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
[Editor(typeof(ColumnCollectionEditor),typeof(System.Drawing.Design.UITypeEditor))]
public ColumnCollection Columns
{
get
{
if (this.m_columns == null)
{
this.m_columns = new ColumnCollection(this);
}
return this.m_columns;
}
}

it works very well, except one thing.

When the number of columns increase or decrease, it should redraw/update
the control, but nothing occurs.
I have to click somewhere on the form to update the control.

I tried to use eventhandlers, but where to use them when there is not
"set" in this property ?

I tried to add them in my ColumnCollection class where is the method to
add column and into the method to remove a column, but nothing worked.

Any ideas ?

thx.

Al.
 

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