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.
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.