Barguast,
AFAIK, there is no way to change this. Classes in general should not
force properties to be set in a specific order, it's just bad design. If
you require all of this information, then you should have a method that
takes everything at once, and performs the operation.
In this case, you will have to make your control adaptable so that it
can react to changes in any of the properties that affect the appearance of
the control. So, when the columns change, you add a new column.
You should probably change the property names to ColumnWidth and
RowHeight. This way, when they are changed, all of the items on the control
change (after all, that is the effect you want).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Barguast" <It*****************@Email.com> wrote in message
news:69**********************************@microsof t.com...
I'm not sure what to make of this problem, but hopefully it's fixable. I
have
created a 'Table' control which is basically just a grid of text boxes.
However, whenever the control is initialised it is done so in the wrong
order:
this.table1.Columns = 3;
this.table1.DefaultColumnWidth = 96;
this.table1.DefaultRowHeight = 22;
this.table1.Rows = 3;
That is an extract from a form's InitializeComponent function. As should
be
able to see the table columns are created before the default column width
is
specified when it really should be done beforehand. Is there any way to
force
the designer to initialise the properties of a control in a specific order
as
opposed to alphabetic?
Thanks in advance