如何设置带有红色边框的必填“编辑"字段? [英] How to set required Edit fields with a red border?

查看:59
本文介绍了如何设置带有红色边框的必填“编辑"字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些字段.当不填写时,它们将变成红色,需要填写.在发布之前

I want to require a little fields. And when they will not be filled in that they will be red and needed to fill in. before the post can be done

以下是我要实现的屏幕截图:

Here is a screenshot of what do I want to achieve:

推荐答案

我要添加一个 TShape ,它可以在您的编辑框周围画一条红线.如果您想用红色边框代替普通的TEdit边框,则可以修改Edit控件的属性,使其没有Border.

I would add a TShape, which can draw a red line around your edit box. If you want the red border to replace the normal TEdit border you can modify the properties of your Edit control so it has no Border.

如果您希望不填充形状,请将笔刷样式更改为 bsClear

If you want the shape to be unfilled, change brush style to bsClear

这篇关于如何设置带有红色边框的必填“编辑"字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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