Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove completely the Panel border in delphi?

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 ?

like image 755
Rafik Bari Avatar asked Dec 04 '22 05:12

Rafik Bari


1 Answers

(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;
like image 93
Andreas Rejbrand Avatar answered Dec 23 '22 10:12

Andreas Rejbrand