Android Question Minisearchview on xCLV, getting text

james_sgp

Active Member
Licensed User
Longtime User
I`m using the Minisearchview on a 'card' in a xCLV for input, but I can`t get its contents using pp.getview(x).xxxx?

If I try getview(x).textfield.text i get error "Uknonwn member: textfield".

Welcoming any suggestions...thanks
 

james_sgp

Active Member
Licensed User
Longtime User
Here is the actual code I am using:

B4X:
    Dim index As Int = reg_clv1.GetItemFromView(Sender)
    Dim p As B4XView = reg_clv1.GetPanel(index)    'base panel
    Dim pp As B4XView = p.GetView(0)     'card panel
    
    Log("6 = " & pp.GetView(6).textfield.text)    <------Minisearchview, error
    Log("7 = " & pp.GetView(7).Text)     <------edit text, works
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
`m using the Minisearchview on a 'card' in a xCLV for input, but I can`t get its contents using pp.getview(x).xxxx?
I think this is what you want, unless I am not understanding your thread objective.
B4X:
Sub Cities_ItemClick (Value As Object)   'Cities is the name of the MiniSearchView
    Dim c As MiniSearchView = Sender
    Log($"Method1, city select: ${c.TextField.Text}"$)
    
    Dim index As Int = xClv.GetItemFromView(c.mBase)   'mBase needs to be changed in the class module from Private to Public
    Log($"Index: ${index}"$)        
    Dim p As B4XView = xClv.GetPanel(index)    'base panel
    Dim pp As B4XView = p.GetView(0)     'card panel
    Dim strVar As String = pp.GetView(0).GetView(0).Text
    Log($"Method2, city select: ${strVar}"$)    
End Sub
IMPORTANT: mBase needs to be changed in the minisearchview class module from Private to Public
If this does not address your question, you need to upload your project or a small project.
 
Upvote 0

james_sgp

Active Member
Licensed User
Longtime User
Woohooo....Mahares, great thanks...

This was what i needed, i hadn`t thought of it that way ?

B4X:
Dim strVar As String = pp.GetView(0).GetView(0).Text
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…