Set max entry to count textbox

Converting to string be lazy instead of computing log10 for digits :)
#884
This commit is contained in:
Kurt 2017-02-24 18:45:50 -08:00
parent 56a343b4df
commit 82de3e5d12

View file

@ -104,6 +104,7 @@ namespace PKHeX.WinForms
dgvIndex.DisplayIndex = c++;
dgvIndex.Width = 45;
dgvIndex.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
((DataGridViewTextBoxColumn) dgvIndex).MaxInputLength = (int)(Math.Log10(Math.Max(1, pouch.MaxCount)) + 1);
}
dgv.Columns.Add(dgvItemVal);