如何在C#中的文本框中添加图标 [英] how to adding icon inside textbox in c#

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

问题描述

如何在文本框内添加图标

how to adding icon inside textbox

推荐答案

您不能在文本框内放置图标:线索就在名字中. 文本框.

它仅包含文本.

如果使用RichTextBox,或者从TextBox派生用户控件,则可以执行此操作.前者可能允许用户删除图标,后者可能将其置于您的控制之下.
You cannot put an icon inside a TextBox: the clue is in the name. TextBox.

It only holds Text.

You can do it if you use a RichTextBox, or if you derive a user control from a TextBox. The former would probably allow the user to delete the icon, the latter would put it under your control.


您可能想绘制图片(用于搜索或表示忙)

看到此链接:
http://www.codeproject.com/Messages/3010929/Re-Icon- in-a-textbox.aspx [ ^ ]
You may want to draw an image (for search or to show busy)

see this link:
http://www.codeproject.com/Messages/3010929/Re-Icon-in-a-textbox.aspx[^]


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

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