private void btnAddMessage_Click(object sender, EventArgs e) { UpdateLayoutForMessage(); var message = new MessageSettings(State, MessageList); message.Anchor = AnchorStyles.None; MessageList.Add(message); AddMessageToLayout(message, MessageList.Count + 1); }
private void AddMessageToLayout(MessageSettings messsage, int index) { tlpMessageList.Controls.Add(messsage, 0, index); tlpMessageList.SetColumnSpan(messsage, 2); }