Question

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 ?

Was it helpful?

Solution

(Your actual problem most likely can be solved without adding a TPanel, but I still answer your actual question here.)

Set BevelInner and BevelOuter to bvNone.

By the way, your code can be written more elegantly as

Panel1.Visible := Length(Edit1.Text) = 0;

OTHER TIPS

I set following properties which worked for me in situation like you have

BevelInner := bvNone;
BevelOuter := bvNone;
BevelKind := bkNone;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top