Keep 5 digits of text entry as enough

This commit is contained in:
Kurt 2026-01-31 22:26:42 -06:00
parent 91ac18dd34
commit 916521f906

View File

@ -188,17 +188,14 @@ private static DataGridViewCheckBoxColumn GetCheckColumn(int c, string name) =>
FlatStyle = Application.IsDarkModeEnabled ? FlatStyle.System : FlatStyle.Flat,
};
private static DataGridViewTextBoxColumn GetCountColumn(int c, string name = "Count")
private static DataGridViewTextBoxColumn GetCountColumn(int c, string name = "Count") => new()
{
var dgvIndex = new DataGridViewTextBoxColumn
{
HeaderText = name,
DisplayIndex = c,
Width = 45,
DefaultCellStyle = {Alignment = DataGridViewContentAlignment.MiddleCenter},
};
return dgvIndex;
}
HeaderText = name,
DisplayIndex = c,
Width = 45,
DefaultCellStyle = { Alignment = DataGridViewContentAlignment.MiddleCenter },
MaxInputLength = 5 // enough to cover ushort.MaxValue (absolute maximum of any quantity ever allowed)
};
private void LoadAllBags()
{