B4J Question Tableview add checkbox

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Easy.

If your tw has 2 columns.
B4X:
Dim row(2) as object
Row(0) = "cell"

Dim cb as checkbox
Cb.initialize("")
Cb.text = "cb inside a two"
Row(1) =  cb
Tableview.items.add(cb)

Well something like that
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
for that you would do this:

B4X:
dim row() as object = tw.items.get(tw.selectedrow)
dim cb as checkbox = row(1) 

log(cb.checked)
 
Upvote 0

Czampo

Member
Licensed User
Easy.

If your tw has 2 columns.
B4X:
Dim row(2) as object
Row(0) = "cell"

Dim cb as checkbox
Cb.initialize("")
Cb.text = "cb inside a two"
Row(1) =  cb
Tableview.items.add(cb)

Well something like that
but :
B4X:
 Tableview.items.add(cb)
or
B4X:
 Tableview.items.add(row)
?
 
Upvote 0
Top