Introduction

Recently, I ran into the problem of grouping components visually. I wasn't satisfied with panels and groupboxes so I searched for an alternative. After some Googling, I decided to write a simple control by myself.

Background

"Good ol' Delphi" provided a nifty component called TBevel for visually grouping controls. It's not a container and acts only like a "spacer".

Controls like this are often used to divide buttons at the bottom of a form from the others above. Take a look at the "OK" and "Cancel" buttons in the screen shot. They are visually grouped together and divided from the rest.

Comments and Discussions

This a very useful control but I noticed that it wasn't redrawing correctly and was leaving artifacts when I docked it the bottom of a form and resided the form at runtime. A couple minutes of Googleing found the solution. I just added the following to fix the problem...