ComponentOne Sizer 8.0
TagSplit Property

Returns or sets whether the tag labels are truncated at the first pipe character (|).

Syntax

[form!]C1Elastic.TagSplit[ = TagSplitSettings ]

Remarks

The settings for the TagSplit property are described below:

Constant

Value

Description

tsNone

0

Use the full tag text as tag labels.

tsPipe

1

Use the part of the tag before the first pipe character ("|") as tag labels.

tsAlignPipe

2

Same as tsPipe, plus interpret the first two characters as an alignment code.

This property allows you to extend the basic tag label functionality by storing additional information in the child control's Tag property and also to override the alignment used to display individual tags.

To store additional information in the child control's Tag property, set the TagSplit property to 1 - tsPipe or 2 - tsAlignPipe and mark the end of the tag label for each control with a pipe character. For example, the following code stores tag labels and an additional help string in each child control's Tag property, then displays the help string when the mouse moves over each child control:

Example Title
Copy Code
Sub Form_Load()
el.TagSplit = tsPipe
el.TagWidth = -100
Ctrl(0).Tag = "Label 0|Help for control 0"
Ctrl(1).Tag = "Label 1|Help for control 1"
Ctrl(2).Tag = "Label 2|Help for control 2"
End Sub
Sub Ctrl_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
HelpLabel = Mid$(Ctrl(Index).Tag, InStr$(Ctrl(Index).Tag, "|") + 1)
End Sub

Normally, all tag labels are aligned according to the CaptionPos property. The final TagSplit setting, 2 - tsAlignPipe, allows you to override the default alignment by starting a tag with a backslash followed by a digit that corresponds to an alignment setting. The table below lists all valid settings, which correspond to the values of the Caption property settings:

Code

Alignment

"\0"

cpLeftTop

"\1"

cpLeftCenter

"\2"

cpLeftBottom

"\3"

cpCenterTop

"\4"

cpCenterCenter

"\5"

cpCenterBottom

"\6"

cpRightTop

"\7"

cpRightCenter

"\8"

cpRightBottom

For example, the following code aligns the first two labels to the top left corner of the tag rectangle, and the third to the bottom right:

Example Title
Copy Code
Sub Form_Load()
el.TagSplit = tsAlignPipe
el.TagWidth = -100
Ctrl(0).Tag = "\0Label 0|Align left top"
Ctrl(1).Tag = "\0Label 1|Align left top"
Ctrl(2).Tag = "\8Label 2|Align right bottom"
End Sub

Other properties that affect tag labels are TagWidth and TagPosition.

Data Type

TagSplitSettings (Enumeration)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback