部分填充文本框的背景颜色 [英] partially filling the background color of textbox

查看:178
本文介绍了部分填充文本框的背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以绘制部分文本框背景吗?


我想说将40%的文本框背景涂成红色。


我使用的是mvc ui控件。


谢谢


解决方案

不,你不能直接这样做。我知道的唯一方法是让你的文本框半透明,并在其背后有一个图像(红色框占据文本框的40%),这将模仿这种行为。


这是类似的关于CodeProject的想法:  http://www.codeproject.com/Articles/4390/ AlphaBlendTextBox-A-透明半透明textbo


Can we paint partial textbox background ?

i want to say paint 40% of the textbox background to red color.

Am using mvc ui controls.

Thanks

解决方案

No, you cannot directly do this. The only way I know of is to make your textbox translucent and have an image behind it (a red box taking up 40% of the textbox) that would mimic this behavior.

Here's a similar idea on CodeProject: http://www.codeproject.com/Articles/4390/AlphaBlendTextBox-A-transparent-translucent-textbo


这篇关于部分填充文本框的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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