Type | Description | |||
Node as Variant | A Node object to ensure that it fits the control's client area. |
Use the EnsureVisibleNode method to ensure that a node fits the control's client area. Use the SelectNode property to select a node. The ScrollOnEnsure property specifies a value that indicates whether the control scrolls the control's content when ensuring that a node is visible. The control automatically scrolls the control's content to ensure that the node being clicked fits the control's client area, if the EnsureVisibleOnSelect property is True.
The following VB ensures that the node is in the client are when the cursor hovers the node:
Private Sub ChartView1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) With ChartView1 Dim n As EXORGCHARTLibCtl.Node Set n = .NodeFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY) If Not (n Is Nothing) Then .EnsureVisibleNode n End If End With End Sub
The following C++ ensures that the node is in the client are when the cursor hovers the node:
void OnMouseMoveChartview1(short Button, short Shift, long X, long Y) { CNode node = m_chartview.GetNodeFromPoint( X, Y ); if ( node.m_lpDispatch != NULL ) m_chartview.EnsureVisibleNode( COleVariant( node.GetKey() ) ); }
The following VB.NET ensures that the node is in the client are when the cursor hovers the node:
Private Sub AxChartView1_MouseMoveEvent(ByVal sender As Object, ByVal e As AxEXORGCHARTLib._IChartViewEvents_MouseMoveEvent) Handles AxChartView1.MouseMoveEvent With AxChartView1 Dim n As EXORGCHARTLib.Node = .get_NodeFromPoint(e.x, e.y) If Not (n Is Nothing) Then .EnsureVisibleNode(n) End If End With End Sub
The following C# ensures that the node is in the client are when the cursor hovers the node:
private void axChartView1_MouseMoveEvent(object sender, AxEXORGCHARTLib._IChartViewEvents_MouseMoveEvent e) { EXORGCHARTLib.Node node = axChartView1.get_NodeFromPoint(e.x, e.y); if (node != null) axChartView1.EnsureVisibleNode(node); }
The following VFP ensures that the node is in the client are when the cursor hovers the node:
*** ActiveX Control Event *** LPARAMETERS button, shift, x, y With thisform.ChartView1 local n n = .NodeFromPoint(x , y ) If !isnull(n) then .EnsureVisibleNode(n) EndIf EndWith