Search code examples
delphidelphi-xe

Why TPanel does not show correct frame/border in Delphi XE?


Tpanel does not show the top and left border under Delphi XE/Win 7. Why?

Example (I just dropped few TPanel from pallete to my form, inside of a TTabSheet):

enter image description here

How do I make it look like the original Delphi 7 control (with all 4 borders), without changeing its properties every time I place it on my form?


Solution

  • Set ParentBackground to false.

    A blue panel on a green form

    Above is a blue panel on a green form (ParentBackground = false). Notice the white upper-left border and the gray bottom-right border. Of course, if both the form and the panel are white, the white border will become invisible.