Hello guys,
I made a class of ABMTable
These are a few codes of my class declaration
Properties & methods worked fine, except for event. The Sub tbl1_Clicked never called when table clicked.
When table clicked, nothing happen, no errors, and table seems not active. Usually, when table clicked, row that clicked became active, indicated by different color from another rows. But this is not a case.
I changed initialization codes to this
This time, when clicked, table became active, it was indicated by different color row, called to Sub GetActiveRow returns OK, but Sub tbl1_Clicked still never called.
Where did I miss ?
Thanks in advance.
I made a class of ABMTable
These are a few codes of my class declaration
B4X:
Sub Class_Globals
Private Tbl As ABMTable
Private RowTheme As String
Private NoOfRows, NoOfCols As Int
Type CellInfo(Val As String,Thm As String)
End Sub
Sub Initialize(page As ABMPage,Headers() As String, HeadThemes() As String, Vis() As Boolean,HTheme As String,RTheme As String)
Tbl.Initialize(page, "tbl1", False, False, True, HTheme)
Tbl.SetHeaders(Headers)
Tbl.SetColumnDataFields(Headers)
Tbl.SetHeaderThemes(HeadThemes)
Tbl.SetColumnVisible(Vis)
Tbl.IsBordered = True
RowTheme = RTheme
Log("initialize")
End Sub
Sub tbl1_Clicked(PassedRowsAndColumns As List)
Log("tbl clicked")
End Sub
Public Sub ReturnABMTable As ABMComponent
Return Tbl
End Sub
Public Sub GetActiveRow
Return Tbl.GetActiveRow
End Sub
Public Sub TtlRows
Return NoOfRows
End Sub
Public Sub TtlCols
Return NoOfCols
End Sub
Properties & methods worked fine, except for event. The Sub tbl1_Clicked never called when table clicked.
When table clicked, nothing happen, no errors, and table seems not active. Usually, when table clicked, row that clicked became active, indicated by different color from another rows. But this is not a case.
I changed initialization codes to this
B4X:
Sub Initialize(page As ABMPage,Row As Int,Col As Int,Headers() As String, HeadThemes() As String, Vis() As Boolean,HTheme As String,RTheme As String)
Tbl.Initialize(page, "tbl1", False, False, True, HTheme)
Tbl.SetHeaders(Headers)
Tbl.SetColumnDataFields(Headers)
Tbl.SetHeaderThemes(HeadThemes)
Tbl.SetColumnVisible(Vis)
Tbl.IsBordered = True
page.Cell(Row,Col).SetFixedHeight(300, True)
page.Cell(Row,Col).AddComponent(Tbl)
RowTheme = RTheme
Log("initialize")
End Sub
This time, when clicked, table became active, it was indicated by different color row, called to Sub GetActiveRow returns OK, but Sub tbl1_Clicked still never called.
Where did I miss ?
Thanks in advance.
Last edited: