From 8de5cc33293e02cbeaf065a5e27741b7855eb709 Mon Sep 17 00:00:00 2001 From: niksedk Date: Wed, 19 Jul 2023 06:58:53 +0200 Subject: [PATCH] More controls --- src/ui/Controls/NikseTimeUpDown.cs | 9 +-------- src/ui/Controls/NikseUpDown.cs | 8 +------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/ui/Controls/NikseTimeUpDown.cs b/src/ui/Controls/NikseTimeUpDown.cs index 1bedc6a57..cf04ab48c 100644 --- a/src/ui/Controls/NikseTimeUpDown.cs +++ b/src/ui/Controls/NikseTimeUpDown.cs @@ -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; diff --git a/src/ui/Controls/NikseUpDown.cs b/src/ui/Controls/NikseUpDown.cs index bcc778b6c..ff7f3b34a 100644 --- a/src/ui/Controls/NikseUpDown.cs +++ b/src/ui/Controls/NikseUpDown.cs @@ -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))