如何使文本框在C#中突出显示 [英] How to make the textbox to highlight in C#

查看:163
本文介绍了如何使文本框在C#中突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当用户输入添加"按钮时,我必须突出显示文本框.文本框在下一页的下一页中,该页应突出显示.我尝试了textbox1.Focus().它只会高亮显示文本框,但要在其中输入文本,用户应单击 鼠标放在上面.我也尝试过

I have to highlight the textbox when the user enters the Add button. The textbox is in nextpage In the next page which should be highlighted. I tried textbox1.Focus(). It will only highlight the textbox, but to enter the text in it, user should click the mouse on it. I also tried

System.Windows.Input.Keyboard.Focus(textbox1);

System.Windows.Input.Keyboard.Focus(textbox1);

您能帮我找出确切的方法吗?

can you please help me to figure out the exact method.


谢谢,
Shilpa


Thx,
Shilpa

推荐答案

textBox1.SelectAll();在文本框中选择所有文本.那是你想做的吗?

textBox1.SelectAll(); with select all text in the textbox. Is that what you want to do?


这篇关于如何使文本框在C#中突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆