【问题标题】:RadTextBox disables on mouseoverRadTextBox 在鼠标悬停时禁用
【发布时间】:2014-12-09 19:11:19
【问题描述】:

我在使用 RadTextBox 时遇到问题。 Telerik 似乎已经融入了这个非常酷的功能(插入讽刺),如果您在某一时刻将控件的启用属性设置为 false,然后将其设置为 true,例如在事件中,在悬停时,控件将返回启用=假状态。

所以我有一个 RadTextBox。在页面加载时,我将其设置为 false。然后在一个事件上(单击编辑按钮),我将启用设置为 true。但是当我将鼠标悬停时,RadTextBox 又被禁用了。

我找到了一些使用 RadTextBox.HoveredStyle 的帮助,但这仅有助于样式设置,而不是启用的属性。

    <telerik:RadTextBox runat="server" ID="RadNoteTextbox" TextMode="MultiLine" CssClass="casenotes-preview-textbox" Skin="" Text="Preview Note" MaxLength="7000"></telerik:RadTextBox>

    private void EnableTextBox()
    {
        RadNoteTextbox.BorderWidth = 2;
        RadNoteTextbox.BackColor = Color.White;
        //RadNoteTextbox.ReadOnly = false;
        RadNoteTextbox.Enabled = true;
    }

    private void DisableTextBox()
    {
        RadNoteTextbox.BorderWidth = 0;
        RadNoteTextbox.BackColor = Color.WhiteSmoke;
        //RadNoteTextbox.ReadOnly = true;
        RadNoteTextbox.Enabled = false;
    }

【问题讨论】:

标签: c# asp.net webforms telerik radtextbox


【解决方案1】:

看起来您将不得不自定义 HoverStyle、EnabledStyle 和 FocusedStyle。他们在最新版本中对此进行了更改,以支持更多可自定义的样式。

请参阅this 链接以供参考。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-16
    • 1970-01-01
    • 2011-08-04
    • 2018-09-03
    • 2012-05-04
    相关资源
    最近更新 更多