More controls

This commit is contained in:
niksedk 2023-07-19 06:58:53 +02:00
parent 948b7318d8
commit 8de5cc3329
2 changed files with 2 additions and 15 deletions

View File

@ -46,14 +46,6 @@ namespace Nikse.SubtitleEdit.Controls
{
}
protected override void OnVisibleChanged(EventArgs e)
{
base.OnVisibleChanged(e);
Height = 23;
Invalidate();
Refresh();
}
public TimeMode Mode
{
get
@ -196,6 +188,7 @@ namespace Nikse.SubtitleEdit.Controls
public NikseTimeUpDown()
{
_maskedTextBox = new MaskedTextBox();
Height = 23;
_maskedTextBox.BorderStyle = BorderStyle.None;
_maskedTextBox.Font = UiUtil.GetDefaultFont();
_maskedTextBox.KeyPress += TextBox_KeyPress;

View File

@ -204,6 +204,7 @@ namespace Nikse.SubtitleEdit.Controls
public NikseUpDown()
{
Height = 23;
_textBox = new TextBox();
_textBox.KeyPress += TextBox_KeyPress;
_textBox.KeyDown += (sender, e) =>
@ -255,13 +256,6 @@ namespace Nikse.SubtitleEdit.Controls
TabStop = false;
}
protected override void OnVisibleChanged(EventArgs e)
{
base.OnVisibleChanged(e);
Height = 23;
Invalidate();
}
private void _textBox_TextChanged(object sender, EventArgs e)
{
if (decimal.TryParse(_textBox.Text, out var result))