ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.PointAt Method (Int32, Int32)

Returns one of the PointAtEnum constants, which indicates the kind of grid element beneath the specified coordinate.

[Visual Basic]

Overloads Public Function PointAt( _

ByVal x As Integer, _

ByVal y As Integer _

) As PointAtEnum

[C#]

public PointAtEnum PointAt(

int x,

int y

);

[Delphi]

public function PointAt(

x: Int32;

y: Int32

): PointAtEnum; overload;

Parameters

x

The x-coordinate.

y

The y-coordinate.

Return Value

The PointAtEnum enumerations under the given coordinate.

Example

The following code uses the PointAt method of the grid to determine if the user has clicked on the RecordSelector in the MouseDown or MouseUp events:

·      Visual Basic

       Private Sub C1TrueDBGrid1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles C1TrueDBGrid1.MouseUp

           If Me.C1TrueDBGrid1.PointAt(e.X, e.Y) = C1.Win.C1TrueDBGrid.PointAtEnum.AtRowSelect Then

               ' Your code goes here.

           End If

       End Sub

·      C#

       private void c1TrueDBGrid1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)

       {

           if ((this.c1TrueDBGrid1.PointAt(e.X, e.Y) == C1.Win.C1TrueDBGrid.PointAtEnum.AtRowSelect)

           {

               // Your code goes here.

           }

       }

·      Delphi

       procedure C1TrueDBGrid1_MouseUp(sender: System.Object; e: System.Windows.Forms.MouseEventArgs);

       begin

         if (Self.C1TrueDBGrid1.PointAt(e.X, e.Y) = C1.Win.C1TrueDBGrid.PointAtEnum.AtRowSelect) then

         begin

           // Your code goes here.

         end;

       end;

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace | C1TrueDBGrid.PointAt Overload List


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.