ComponentOne List 8.0 for ActiveX
CellTop Property

 

CellTop Property

Returns top column border, adjusted for multiple lines.

Syntax

column.CellTop

Remarks

Read-only at run time. Not available at design time.

Property applies to Column object.

The CellTop property returns the vertical offset of the top of any cell in the specified column relative to the top of the containing row in terms of the coordinate system of the control 's container.

If the control's MultipleLines property is 0 - Disabled (the default value), a single record cannot span multiple lines in the control, and the CellTop property returns zero for all columns.

If the control's MultipleLines property is either 1 - Variable or 2 - Fixed, a single record may span multiple lines in the control. For columns on the first line, the CellTop property returns zero. For columns on the second line, the CellTop property returns the cell height (the control's RowHeight property). For columns on the third line, the CellTop property returns twice the cell height, and so on.

For example, the following code places a text box on top of the control cell in the first column of the fourth displayed row:

With TDBList1

    Text1.Top = .Top + .RowTop(3) + .Columns(0).CellTop

End With

Note: To overlay the text box exactly on a control cell, you may need to account for an extra pixel in the width and height, depending upon the settings of the DividerStyle and RowDividerStyle properties. In Visual Basic, if the ScaleMode (Form) property of the parent form is set to pixels, then you can simply add 1. If the ScaleMode (Form) is set to twips, then you can add the TwipsPerPixelX (Screen) and TwipsPerPixelY (Screen) properties of the Screen (Visual Basic) object.

See Also

Column Object, Columns Collection

 

 


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

Product Support Forum  |  Documentation Feedback