I am trying to make a table programatically. So far I have managed to create the table with the relevant number of rows and columns. But the problem is that the cells do not wrap around its contents residing in them.
For example, there is a textbox, the user types something in and that word appears in the table. In my case, if the user typed in 'web', it'll appear, but if they type anything larger than 7 characters, then it does not appear.
I've currently got this in my code:
tableLayoutPanel1.Controls.Clear();
tableLayoutPanel1.ColumnStyles.Clear();
tableLayoutPanel1.RowStyles.Clear();
tableLayoutPanel1.ColumnCount = getNumber();
tableLayoutPanel1.RowCount = courseObj.Level_41.Count;
I've used clear()
first to clear the table because I will soon be implementing a delete button next to the words. E.g. the user can press a button next to the relevant word to delete it.
EDIT = fixed it. Had to make the autoSize of my label be true.