Home All Groups Group Topic Archive Search About

Change the rowspan, columnspan property of a button control in a TableLayoutPanel at runtime

Author
12 Jun 2006 8:02 AM
steve
Hi All

I need to change the rowspan, columnspan properties of a control when they
are within a TableLayoutPanel (VB.net 2005)

At runtime the property is not available, but is at design time

Any ideas

Regards
Steve

Author
12 Jun 2006 5:03 PM
Chris Dunaway
steve wrote:

>
> At runtime the property is not available, but is at design time
>

Have you tried the SetColumnSpan method of the TableLayoutPanel?
Author
13 Jun 2006 4:06 AM
Linda Liu [MSFT]
Hi Steve,

Thank you for posting.

Yes, the RowSpan and ColumnSpan properties of a control are only available
at design time. To change the rowspan and columnspan of a control in a
TableLayoutPanel control at run time, you should use the SetRowSpan() and
SetColumnSpan() methods of the TableLayoutPanel class.

For example,  there's a textbox in a TableLayoutPanel control. To set the
rowspan to 2 and columnspan to 2 of the textbox at run time, you should use
the following statements.

TableLayoutPanel1.SetRowSpan(TextBox1, 2)
TableLayoutPanel1.SetColumnSpan(TextBox1, 2)

Hope this is helpful for you.
If you have any other concerns or need anything else, please don't hesitate
to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support

====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================