iOS Question TableView problem

moore_it

Well-Known Member
Licensed User
Longtime User
When i use a tableview (iUI8 library) and i put a customview with an designer layout into a tablecell with a button and textfield ... when i click on button use this code ...

B4X:
Sub btnClick_Click
   Dim btn As Button = Sender
   Dim no As NativeObject = btn
   Dim Parent As Panel = no.GetField("superview") 'get the button's parent
   Dim tf As TextField = Parent.GetView(1) 'this is the text field index (based on the order in the layout file).
   Msgbox("Tag value of textfield: ", tf.tag)
End Sub

if i use the tf (textfield) TAG property this is always null !
It's an lib bug or a my error ?

Thanks in advice !
Toni
 

moore_it

Well-Known Member
Licensed User
Longtime User
Sure, when i load the panel of tablecell like this code ...

for any row of my table:
B4X:
dim p as panel
p.initialize("myCell")
p.width = 100%x
p.height = myTableView.rowheight
p.loadlayout("myLayout")
'(mytextfield is included in myLayout and definited in class_globals)
myTextField.text = "Test"
myTextField.tag = "tag"
dim tc as tableCell = myTableView.addsingleline("")
tc.customview = p

but tag is always blanks (i try with the iUI8 library).
 
Upvote 0
Top