Hide

SftTree/OCX 7.5 - ActiveX Tree Control

Display
Print

GetPosition Method, SftTreeHeaders Object

Returns the coordinates of the combined row/column header and all column headers.

Syntax

VB.NETBoolean = object.GetPosition(ByRef Left As Single, ByRef Top As Single, ByRef Width As Single, ByRef Height As Single) As Boolean
VBBoolean = object.GetPosition(Left As Single, Top As Single, Width As Single, Height As Single) As Boolean
C#.NETbool Boolean = object.GetPosition(out float Left, out float Top, out float Width, out float Height);
VC++VARIANT_BOOL Boolean = object->GetPosition(float* Left, float* Top, float* Width, float* Height);
CHRESULT object->raw_GetPosition(float* Left, float* Top, float* Width, float* Height, VARIANT_BOOL* Boolean);

object

A SftTreeHeaders object.

Left

Returns the horizontal position relative to the top, left corner of the tree control. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

Top

Returns the vertical position relative to the top, left corner of the tree control. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

Width

Returns the width of the column header. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

Height

Returns the height of the column header. The units used depend on the container (Visual Basic, Visual C++, etc.) and the coordinate system used.

Span

Returns the number of columns that the column header occupies. If cell merging is allowed and the column header merges into an adjacent column header, a column header can span more than one column.

Boolean

BooleanDescription
TrueThe column headers are displayed and visible.
FalseThe column headers are not visible. The returned coordinates are not valid.

Comments

The GetPosition method returns the coordinates of the combined row/column header and all column headers.

The GetPosition and Headers.GetPositionPix methods are synonyms, but may use different coordinate systems.

The Header.GetPosition method can be used to retrieve the coordinates of one column header.

Examples

VB6

    SftTree1.CancelMode
    PopupMenu MenuForm.HeaderPopup
End Sub

Private Sub SftTree1_ContextMenu(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)

    ' Determine click context menu for header or item
    Dim l As Single, t As Single, h As Single, w As Single
    SftTree1.Headers.GetPosition l, t, w, h
    If X >= l And X < l + w And Y >= t And Y <= t + h Then
        HeaderMenu
        Exit Sub
    End If

    ' determine item right-clicked
    Dim ItemIndex As Long

See Also SftTreeHeaders Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.


Spring Break!

Our offices will be closed this week (March 18 through March 22).

We'll be back March 24 to address any pending sales and support issues.