Minor improvement to listview

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@151 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2010-11-16 16:14:02 +00:00
parent 7426f453d8
commit 5bc07de545

View File

@ -67,8 +67,11 @@ namespace Nikse.SubtitleEdit.Controls
if (!IsColumTextAlternateActive)
{
Columns.Add(new ColumnHeader { Text = text, Width = -2 });
Columns[ColumnIndexText].Width = 250;
SubtitleListView_Resize(null, null);
int length = Columns[ColumnIndexNumber].Width + Columns[ColumnIndexStart].Width + Columns[ColumnIndexEnd].Width + Columns[ColumnIndexDuration].Width;
int lengthAvailable = this.Width - length;
Columns[ColumnIndexText].Width = (lengthAvailable / 2) - 15;
Columns[ColumnIndexTextAlternate].Width = -2;
}
}