From aef7b2f00cb5a82530d2a2b5435ee8b152c4de56 Mon Sep 17 00:00:00 2001 From: asuper Date: Tue, 17 Oct 2023 15:04:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DUIIPTextBox=E5=9C=A8Readonly?= =?UTF-8?q?=E4=B8=94=E5=85=89=E6=A0=87=E4=BD=8D=E4=BA=8E=E5=B0=8F=E6=95=B0?= =?UTF-8?q?=E7=82=B9=E5=90=8E=E9=9D=A2=E6=97=B6=EF=BC=8C=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E9=80=9A=E8=BF=87Backspace=E9=94=AE=E5=88=A0=E9=99=A4=E5=89=8D?= =?UTF-8?q?=E4=B8=80=E4=BD=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/UIIPTextBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SunnyUI/Controls/UIIPTextBox.cs b/SunnyUI/Controls/UIIPTextBox.cs index 50efd5af..6aaee93f 100644 --- a/SunnyUI/Controls/UIIPTextBox.cs +++ b/SunnyUI/Controls/UIIPTextBox.cs @@ -116,7 +116,7 @@ namespace Sunny.UI TextBox txtPrev = PrevTextBox(t); if (txtPrev == null) return; txtPrev.Focus(); - if (txtPrev.TextLength > 0) + if (!ReadOnly && txtPrev.TextLength > 0) txtPrev.Text = txtPrev.Text.Remove(txtPrev.TextLength - 1, 1); txtPrev.SelectionStart = txtPrev.TextLength;