A Alex69 Member Licensed User Longtime User Jul 13, 2012 #1 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
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
klaus Expert Licensed User Longtime User Jul 13, 2012 #2 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: Jul 13, 2012 Upvote 0
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.
A Alex69 Member Licensed User Longtime User Jul 13, 2012 #3 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
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
klaus Expert Licensed User Longtime User Jul 13, 2012 #4 If you want to catch the CellClick event you need to add an event routine in your code Code: Copy Sub TableName_CellClick(Col As Int, Row As Int) . . End Sub Best regards. Upvote 0
If you want to catch the CellClick event you need to add an event routine in your code Code: Copy Sub TableName_CellClick(Col As Int, Row As Int) . . End Sub Best regards.
A Alex69 Member Licensed User Longtime User Jul 13, 2012 #5 Thanks a lot! This is what I needed!:sign0060: Upvote 0
S shabab Member Licensed User Longtime User Oct 12, 2012 #6 Table Class Row Count Hi, Can anyone help me to get Row Count in the Table Class... Upvote 0
M Mahares Expert Licensed User Longtime User Oct 12, 2012 #7 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
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.
S shabab Member Licensed User Longtime User Oct 19, 2012 #8 Its working thanks a lot... its working... im new to b4a and im loving it.... Upvote 0