I have B4XTable and in the first column I want to add two buttons.
I insert rows from a list successfully but the first column stay always blank.
What I am doing wrong?
I insert rows from a list successfully but the first column stay always blank.
What I am doing wrong?
B4X:
Sub Activity_Create(FirstTime As Boolean)
...
...
...
editCol = B4XTable1.AddColumn("Edit", B4XTable1.COLUMN_TYPE_TEXT)
editCol.Sortable = False
editCol.Width = 127dip
B4XTable1.RowHeight = 55dip
B4XTable1.AddColumn("Code", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Description", B4XTable1.COLUMN_TYPE_TEXT)
LoadGeneralClassDataList
...
...
...
End Sub
B4X:
Sub LoadGeneralClassDataList
B4XTable1.SetData(ItemListSelection)
For i = 1 To editCol.CellsLayouts.Size - 1
Dim p As B4XView = editCol.CellsLayouts.Get(i)
p.AddView(CreateButton("btnEdit", Chr(0xF044)), 2dip, 5dip, 40dip, 40dip)
p.AddView(CreateButton("btnDelete", Chr(0xF00D)), 44dip, 5dip, 40dip, 40dip)
Next
End Sub
Sub CreateButton (EventName As String, Text As String) As B4XView
Dim Btn As Button
Dim FontSize As Int = 14
Btn.Initialize(EventName)
Dim x As B4XView = Btn
x.Font = xui.CreateFontAwesome(FontSize)
x.Visible = False
x.Text = Text
Return x
End Sub
Last edited: