TableView - handle click?

Alex69

Member
Licensed User
Longtime User
Hi,
I have a question about using tableview click. It isn't so obvious how to use it(there are no comments in the class). Can someone explain me how to handle it?
Alex
 
Are you speeking of Erels' Table Class ?
If yes you have the Table1_CellClick and Table2_CellClick events returning the column and row indexes so know where in the table you are. And with Table1.GetValue(col, rowl) you get the content of a cell.

Best regards.
 
Last edited:
Upvote 0
As far as I understood class searches xxx_cellclick event or I am mistaken?
Code: Copy
Private Sub Cell_Click
   Dim rc As RowCol
   Dim l As Label
   l = Sender
   rc = l.Tag
   SelectRow(rc.Row)
   If SubExists(Callback, Event & "_CellClick") Then
      CallSub3(Callback, Event & "_CellClick", rc.Col, rc.Row)
   End If
End Sub
 
Upvote 0
Here is one way to do it:
Add the following sub to the Table class module:
Code: Copy
Public Sub RowCount As Int
   Return Data.Size
End Sub

Then, in your main module do this:
Code: Copy
Dim Table1 as Table
Dim RecCount as Int
.
.
RecCount=Table1.RowCount
Msgbox(RecCount,"")     'returns the number of records in your table.
 
Upvote 0
Back
Top