Skip to main content
Email Password   helpLost your password?
Sample Image - bevelcontrol.jpg

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.

Using the code

Provided are four additional properties:

BevelStyle Possible values:
public enum BevelStyle
{
  Lowered,
  Raised
}
BevelType Possible values:
public enum BevelType 
{
  Box, 
  Frame, 
  TopLine, 
  BottomLine, 
  LeftLine,
  RightLine, 
  Spacer                        
}
HighlightColor Possible values:
any Color
ShadowColor Possible values:
any Color

Points of Interest

Well, there are none... It's just a simple graphical control. Nothing special - but definitely a "nice to have".

There is only one thing I could mention here: The value BevelType.Spacer displays a dotted rect around the control only at designtime.

History

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralArtifacts when resizing Pin
JustAResearcher
10:51 6 Nov '09  
GeneralVery Nice Pin
sunnyandy
10:06 27 Sep '08  
GeneralHow about ControlPaint Pin
Oleg A.Lukin
23:37 29 Jan '07  
GeneralRe: How about ControlPaint Pin
OlliFromTor
0:07 30 Jan '07  
GeneralToolbox Pin
fraveu
8:51 29 Jan '07  
GeneralRe: Toolbox Pin
OlliFromTor
22:45 29 Jan '07  
GeneralRe: Toolbox [modified] Pin
fraveu
3:48 30 Jan '07  
GeneralExcellent Pin
Patrick Sears
10:47 26 Jan '07  
GeneralNice Pin
ricmil42
8:25 26 Jan '07  
GeneralRe: Nice Pin
Ilíon
6:18 29 Jan '07  


Last Updated 26 Jan 2007 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009