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

S

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
 
L

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

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