I have the following code for adding information from and array to a listbox
private void buttonAdd_Click(object sender, EventArgs e)
{
//add tracks to my tracks Add Tracks list box and tracks list box
myTracksString[nextAvailbleRow, 0] = textBoxArtist.Text;
myTracksString[nextAvailbleRow, 1] = textBoxSongName.Text;
myTracksString[nextAvailbleRow, 2] = ((numericUpDownHours.Value * 3600) + (numericUpDownMinutes.Value * 60) + numericUpDownSeconds.Value).ToString();
nextAvailbleRow++;
textBoxSongName.Text = "";
textBoxArtist.Text = "";
numericUpDownHours.Value = 0;
numericUpDownMinutes.Value = 0;
numericUpDownSeconds.Value = 0;
listBoxAddTrack.Items.Clear();
for (int indexInteger = 0; indexInteger <= 199; indexInteger++)
{
listBoxAddTrack.Items.Add(myTracksString[indexInteger, 0] + " " + myTracksString[indexInteger, 1] + " " + myTracksString[indexInteger, 2]);
}
The issue I have is when I add the information it doesn't line up in columns i.e. row 1 has 3 columns but then in row 2 the columns line up differently if the number of letters in that column is more than the number of letters in column 1, row 1.
So what I am wanting to know is how can I write some code that allows each column to line up in the same place regardless of how many letters are in each word. Hope that makes sense !!