TableLayoutStyleCollection.Add(TableLayoutStyle) TableLayoutStyleCollection.Add(TableLayoutStyle) TableLayoutStyleCollection.Add(TableLayoutStyle) TableLayoutStyleCollection.Add(TableLayoutStyle) Method

定义

在当前集合的末尾添加一个新的 TableLayoutStyleAdds a new TableLayoutStyle to the end of the current collection.

public:
 int Add(System::Windows::Forms::TableLayoutStyle ^ style);
public int Add (System.Windows.Forms.TableLayoutStyle style);
member this.Add : System.Windows.Forms.TableLayoutStyle -> int
Public Function Add (style As TableLayoutStyle) As Integer

参数

返回

新元素的插入位置。The position into which the new element was inserted.

异常

style 已经分配给另外一个所有者。style is already assigned to another owner. 必须首先将其从当前位置移除或将其克隆。You must first remove it from its current location or clone it.

注解

方法将表布局重新应用于当前TableLayoutPanel容器中的所有控件。 AddThe Add method reapplies the table layout to all the controls in the current TableLayoutPanel container.

集合中存储的样式数量仅受可用内存的限制。The number of styles stored in a collection is limited only by available memory.

适用于