在文本框中选择文本 [英] Select text in textbox

查看:85
本文介绍了在文本框中选择文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.如何突出显示文本框中的文本?
我写了这段代码.

Hi. How can I highlight the text in the textbox?
I wrote this code.

Textbox.SelectionStart = 0;
Textbox.SelectionLength = Textbox.Text.Length;

推荐答案

在这里,您可以进行以下操作:如何:在Windows窗体文本框控件中选择文本 [ ^ ]

这是我搜索您的问题时Google给我的第一个链接.

我看到你虽然朝着正确的方向前进. :)
Here you go: How to: Select Text in the Windows Forms TextBox Control[^]

This was the first link Google gave me when I searched for your question.

I see you are going in a right direction though. :)


这篇关于在文本框中选择文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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