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

  • Thread starter Thread starter steve
  • Start date Start date
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
 
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.
====================================================
 
Back
Top