SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Returns the coordinates of the combined row/column header and all column headers.
VB.NET | Boolean = object.GetPositionPix(ByRef LeftPix As OLE_XPOS_PIXELS, ByRef TopPix As OLE_YPOS_PIXELS, ByRef WidthPix As OLE_XSIZE_PIXELS, ByRef HeightPix As OLE_YSIZE_PIXELS) As Boolean |
VB | Boolean = object.GetPositionPix(LeftPix As OLE_XPOS_PIXELS, TopPix As OLE_YPOS_PIXELS, WidthPix As OLE_XSIZE_PIXELS, HeightPix As OLE_YSIZE_PIXELS) As Boolean |
C#.NET | bool Boolean = object.GetPositionPix(out OLE_XPOS_PIXELS LeftPix, out OLE_YPOS_PIXELS TopPix, out OLE_XSIZE_PIXELS WidthPix, out OLE_YSIZE_PIXELS HeightPix); |
VC++ | VARIANT_BOOL Boolean = object->GetPositionPix(OLE_XPOS_PIXELS* LeftPix, OLE_YPOS_PIXELS* TopPix, OLE_XSIZE_PIXELS* WidthPix, OLE_YSIZE_PIXELS* HeightPix); |
C | HRESULT object->raw_GetPositionPix(OLE_XPOS_PIXELS* LeftPix, OLE_YPOS_PIXELS* TopPix, OLE_XSIZE_PIXELS* WidthPix, OLE_YSIZE_PIXELS* HeightPix, VARIANT_BOOL* Boolean); |
object
A SftTreeHeaders object.
LeftPix
Returns the horizontal position relative to the top, left corner of the tree control in pixels.
TopPix
Returns the vertical position relative to the top, left corner of the tree control in pixels.
WidthPix
Returns the width of the column header in pixels.
HeightPix
Returns the height of the column header in pixels.
Span
Returns the number of columns that the column header occupies.
Boolean
Boolean | Description |
---|---|
True | The column headers are displayed and visible. |
False | The column headers are not visible. The returned coordinates are not valid. |
The GetPositionPix method returns the coordinates of the combined row/column header and all column headers.
The Headers.GetPosition and 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.
End Sub Private Sub AxSftTree1_ContextMenuEvent(ByVal sender As Object, ByVal e As AxSftTreeLib75._DSftTreeEvents_ContextMenuEvent) Handles AxSftTree1.ContextMenuEvent Dim P As Point P = AxSftTree1.PointToScreen(New Point(e.x, e.y)) ' Determine click context menu for header or item Dim L As Integer, T As Integer, H As Integer, W As Integer AxSftTree1.Headers.GetPositionPix(L, T, W, H) If e.x >= L And e.x < L + W And e.y >= T And e.y <= T + H Then HeaderMenu(PointToClient(P)) Return End If ' determine item right-clicked Dim ItemIndex As Integer
} private void axSftTree1_ContextMenuEvent(object sender, AxSftTreeLib75._DSftTreeEvents_ContextMenuEvent e) { Point point = axSftTree1.PointToScreen(new Point(e.x, e.y)); // Determine click context menu for header or item int l, t, h, w; axSftTree1.Headers.GetPositionPix(out l, out t, out w, out h); if (e.x >= l && e.x < l + w && e.y >= t && e.y <= t + h) { HeaderMenu(PointToClient(point)); return; } // determine item right-clicked int ItemIndex = axSftTree1.Items.HitTestPix(e.x, e.y);
void CBookTableDlg::OnContextMenuSftTree1(short Button, short Shift, long x, long y) { CPoint pt(x, y); ::MapWindowPoints((HWND) m_vTree->hWnd, NULL, &pt, 1); // Determine click context menu for header or item long l, t, w, h; m_vTree->Headers->GetPositionPix(&l, &t, &w, &h); if (x >= l && x < l + w && y >= t && y <= t + h) { HeaderMenu(pt); return; } // determine item right-clicked long ItemIndex; ItemIndex = m_vTree->Items->HitTestPix(x, y);
See Also SftTreeHeaders Object | Object Hierarchy