Android Question [SOLVED] xCLV Changing 2 or more label text on one click

yfleury

Active Member
Licensed User
Longtime User
I have a xCustomListView and i add a panel with many label.
When I click on a label or panel, I want to change value of many label at same time.
B4X:
clvMessagesClients.Add(Create_plainte(idplainte, laPlainte, adresse, telephone, ladateetheure),1)

Sub Create_plainte(id As Int, plainte As String, adresse As String, telephone As String, dateheure As Long) As Panel
    Dim p As Panel
    p.Initialize("")
    p.SetLayout(0, 0, pnlMessagesClients.Width -30dip , 100dip)
    p.LoadLayout("createmessageclient")
    p.Height=lblMessageClient.Height+lblMessageClient.top+4dip
    lblAdresse.Text = adresse
    lblTelephone.Text=telephone
    lblMessage.text=plainte
    Return p
End Sub

Sub lblMessage_Click
    Dim lbl As Label
    lbl=Sender
    ' I can change only lbl
    ' I need to change lblMessage2 text too.
    lbl.TextColor=Colors.Green
    lbl.Text=Chr(0x0f046)
    lblMessage2.Text=Chr(0xf0e0)
End Sub

Can you point the way to solve this
 

Peter Simpson

Expert
Licensed User
Longtime User
When I click on a label or panel, I want to change value of many label at same time.

Change the values from where to which many babels?
Where are the new label values coming from?

Hello @yfleury,
If you search the forum you will find the answer to your question in multiple posts, but you can also find the answer HERE too...
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
@Peter Simpson thanks for fast answer. I do some research before posting here, but English is not my first language so, that is sometimes difficult for me.

I take a look on your link and I will try something tomorrow.
Thank
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
@Peter Simpson I haven't try your code from tutorial. I look your code and now I will rewrite my activity based on a very good tutorial.
It very simple and clear to understand. Thank you very much.
 
Upvote 0
Top