Subject Re: [IBO] IBC_Label
Author Geoff Worboys
Mike,

> I have not been able to locate description and examples
> (if there are any ) of the subproperties of the AutoLabel.
> Do you have anything in archive which will assist me ?

Its pretty new and no documentation or examples have been created at
this point. So...

property Kind = Whether the label appears left of the control, above
the control or not at all.

property Suffix = Text to appear at the end of the label text. I
generally use ": " - the extra space giving a bit of space between the
label and the control.

property Caption = When this is empty the label will use the
DisplayLabel (see FieldsDisplayLabel property of TIB_Statement) if
available, otherwise just the fieldname. If you provide a value for
Caption it will be used instead.

property RelativePosition = When 0 the label is auto placed. When
Kind=albLeft a value of -100 (for example) says to left align the
label 100 pixels to the left. When Kind=albTop a valud of -20 (for
example) says to start the label 20 pixels above the control.

property Margin = gives the offset from the top (if Kind=albLeft) or
offset from the left (if Kind=alTop) - in order to best align the
label text with the control text.

property Model = allows you to setup a particular TIB_Edit or
TIB_Label or TLabel control (only those will work) as a model. If you
define a model then many of the label properties will be read directly
from the label of the model and the internal values will be ignored.

property Options

albAlignToModel = tries to align the label with the model label - if
defined

albLowerCase = force the label to lower case

albOnlyFirstCharUpper = force the label to propercase

albBoldIfRequired = if field associated with the control is
required, then label will be shown in bold.

albDotLeader = show a dotleader when appropriate. If
RelativePosition is -100 and the label text only uses half of that
then the label will appear as (for example)...
"Label . . . .: "[control]

albSuffixBeforeDots = reverses the placement of the suffix and the
dotleader so that the previous example would become...
"Label: . . . ."[control]


Note: AutoLabel uses TIB_Label internally so you can also look at
TIB_Label for some alternative implementations (labels on the right of
the control or whatever). TIB_Label looks at the control assigned to
its FocusControl property to give similar capabilities as those
described above (but it does not update quite so dynamically with
changes to the dataset).

HTH

Geoff Worboys
Telesis Computing