简体   繁体   中英

Select text in a disabled textbox in C#

如何在禁用的文本框中选择文本?

如果您希望能够选择文本,请使用ReadOnly属性而不是禁用该控件。

使用readonly而不是禁用它。

删除enabled=false属性,并将其添加到您的代码隐藏:

 YourTextBox.Attributes.Add("readonly", "readonly");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM