delphi中如何完全去除面板边框?
在我的应用程序中,我创建了一个注册表单,只要编辑为空或包含一些错误,我就需要显示错误图标。但图像没有名称属性,因此我无法通过其名称调用隐藏图像。因此我决定将图像放入面板中并隐藏面板。类似于:
if(lenght(edit1.text)=0) then
Panel1.show else Panel1.hide; // this code shows or hide the image
问题是在将 BorderStyle 设置为 bsNone 后面板的边框仍然出现。
如何完全隐藏面板边框?
In my application, i've created a signup form and i need to show an Error Icon whenever an Edit is empty or contain some error. But the image haven't a Name property and therefor i am unable to to call the Hide the image by its name. Therefore i decided to put an image into the panel and hide the panel instead. something like :
if(lenght(edit1.text)=0) then
Panel1.show else Panel1.hide; // this code shows or hide the image
The problem is that the panel's border still appear after setting BorderStyle to bsNone.
How to hide completely the panel's border ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
(您的实际问题很可能无需添加
TPanel
即可解决,但我仍然在这里回答您的实际问题。)将
BevelInner
和BevelOuter
设置为bvNone
。顺便说一下,你的代码可以写得更优雅:
(Your actual problem most likely can be solved without adding a
TPanel
, but I still answer your actual question here.)Set
BevelInner
andBevelOuter
tobvNone
.By the way, your code can be written more elegantly as
我设置了以下属性,这些属性在您遇到的情况下对我有用
I set following properties which worked for me in situation like you have