mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 05:48:44 +00:00
Set max entry to count textbox
Converting to string be lazy instead of computing log10 for digits :) #884
This commit is contained in:
parent
56a343b4df
commit
82de3e5d12
1 changed files with 1 additions and 0 deletions
|
@ -104,6 +104,7 @@ namespace PKHeX.WinForms
|
||||||
dgvIndex.DisplayIndex = c++;
|
dgvIndex.DisplayIndex = c++;
|
||||||
dgvIndex.Width = 45;
|
dgvIndex.Width = 45;
|
||||||
dgvIndex.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
dgvIndex.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||||
|
((DataGridViewTextBoxColumn) dgvIndex).MaxInputLength = (int)(Math.Log10(Math.Max(1, pouch.MaxCount)) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
dgv.Columns.Add(dgvItemVal);
|
dgv.Columns.Add(dgvItemVal);
|
||||||
|
|
Loading…
Add table
Reference in a new issue