Android Question [SOLVED] B4XTable not show buttons in column

makis_best

Well-Known Member
Licensed User
Longtime User
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?

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:

makis_best

Well-Known Member
Licensed User
Longtime User
Erel... That's the example I use but not working for me...
No errors no nothing but also no buttons.
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
Run the example as-is. Do you see the buttons after you add an item?


I see buttons exactly as you say..

You mean that I need to add them one by one not to insert them with list?
 
Last edited:
Upvote 0
Top