日時:2024年4月16日
やったこと:ユーザーコントロール変更(0詰めのスピンボタン)
言語:C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace EmployeeInformationManagment
{
public partial class NumericUpDownZeroFill4 : NumericUpDown
{
public NumericUpDownZeroFill4()
{
InitializeComponent();
}
public override string Text
{
get
{
return base.Text;
}
set
{
base.Text = value.ToString().PadLeft(4, '0');
}
}
}
}



コメント