Issue I have a simple ui, where user enters a value click on the "ok" button, the SubmitDateHandler click handler should then insert a label to the form with the value from the textbox. Then when this is repeated again, Add another label underneath the existing label. how to dynamically add multiple labels in a new line?
my code, at the moment is able to add one label, but not the second one.
private void SubmitDatebtn_Click(object sender, EventArgs e)
{
Label dateLabel = new Label();
dateLabel.Text = this.Controls.Find("Datetxt", true)[0].Text + Environment.NewLine;
this.LatestScoresPanel.Controls.Add(dateLabel);
}
LatestScoresPanel
? – Tim