GLnB: Group, Label & Button
How to describe a universal component?
Well: GLnB is the component that will change your life!
O.K., O.K., maybe we should ask first , what a GLnB (Group, Label & Button) actually is:
Is it a Groupbox?
It may look like a Goupbox and above all it can receive components, which will then move along with it.
Nevertheless: No, because:
Is it a button?
Almost: It can look like any kind of button. Yet, all colors may be determined,
even bitmap patterns may be used.
Moreover, extreme depth or height effects may be created, framed or transparent
click-sensitive regions, e.g. for background bitmaps, with or without a visible
click effect.
There are many similarities to a speedbutton:
So it' s a label?
Now, the answer is definitely: Yes.
The label was the starting-point of our considerations, because it is an
omnipresent companion of other visible components in forms anyway.
It is not only important because many dialog elements have to be labeled,
but because it is handling the keyboard shortcuts of these dialog elements
also.
As a label, GLnB can do anything, an ordinary label can do.
But of course it can do more:
This lot of design options is perfectly suitable to improve and combine other components.
It is really impossible to describe the whole variety of designs and functions which is opened by GLnB.
This is exactly what we wanted to achieve with GLnB!
And this versatility will make it as indispensable for you soon as for us today.
What else can GLnB do?
The scaling concept
First of all, GLnB is intended for shaping and combining other components.
Important for that are the multi-functional layers, which can serve as frames,
backgrounds, shadows, buttons, etc..
For this it is generally useful that some frames keep their distance to the
borders of the GLnB, while buttons keep their seize and position (e.g. top
right).
Or maybe the other way round, as you like:
GLnB has an elaborate scaling concept with absolute and relative alignments, which leaves nothing to be desired.
By means of this, you can develop your own layouts, which you will employ again and again.
An enormous gain in productivity.
The ability to integrate itself
Aside from the possibility to link as many components to it as you like,
which may also be GLnBs (chaining), a GLnB can be integrated in a TWinControl.
E.G: in (DB-)Edits, (DB-)Grids, TabSets etc..
By means of this, status displays or buttons can be placed in unused regions
of these dialog controls.
The support of runtime behavior
Our components shall not only be very productive at design time, but also
at runtime.
Above all, a display or dialog component should be able to change its state,
i.e. its properties at any time.
Maybe additional ouptput is needed, within or outside its borders, perhaps synchronized with regular output changes.
Whatever - it works!
Maybe GLnB will not change your life.
Perhaps though, it will change your life a little...
GLnB: Group, Label & Button
Properties (overview):
Types are mentioned, if not yet obvious by the property's name.
Aside from the properties listed below GLnB owns all the properties of TLabel. The ancestor is TGraphicControl.
(#: Modified properties of TLabel.)
public
- # Alignment
- AlignmentVertical (avTop, avCenter, avBottom)
- # AutoSize
- BorderStyle
- Ctl3D
- FrameBack/Text/Top...
- ButtonState: set of (bsRounded, bsDown, bsInvertDown, bsFocused, bsEnabled, bsSwitch)
- Color2D
- Color3D
- FixMargin: set of (fmTop, fmLeft, fmBottom, fmRight)
- MarginBottom/Left/Right/Top: Integer
- Style: (bsAutoDetect, bsNew, bsWin31, fs2D, fs2DBordered, fs3D, fs3DBordered, fsFrame)
- Surface
- Color
- Pattern: TBitmap
- PatternColor
- Style: (ssSolidOrPattern, ssTransparent, ssShadow)
- Width
- LinkList: TLinkList
- ParentControl: TWinControl
- TransparentText: Boolean
New events:
- OnBefore/AfterPaint
New methods:
- procedure DrawFrame(Var Client: TRect; Color2D,Color3D: TColor ; BevelWidth: Integer; Style: TFrameStyle; IsRounded, IsDown, IsFocused: Boolean)
- procedure DrawSurface(Const Frame: TFrameShape; Var Client: TRect)
- function FrameShapeRect(Const Frame:TFrameShape):TRect
Editors:
- TLinkListEditor
- TLinkListComponentEditor