B4J Question Click event of label inside the xcustomlistview (inside expandable customlistview)

Chris Guanzon

Active Member
Licensed User
Longtime User
Hello everyone! How can I handle the click event of a label inside xcustomlistview where this xcustomlistview is inside the expandable customlistview? The error occurs when I click the first item until before the last item. Attached is the sample application to provide more information.
 

Attachments

  • Sidebar Menu Ex.zip
    7.1 KB · Views: 110

teddybear

Well-Known Member
Licensed User
It seems you would like to get SubItem. try this code.
B4X:
Private Sub lblSubItem_MouseClicked (EventData As MouseEvent)

    Dim lblCardNumber As Label=Sender
    Log(lblCardNumber.Text) 
   
End Sub
 
Upvote 0

Chris Guanzon

Active Member
Licensed User
Longtime User
It seems you would like to get SubItem. try this code.
B4X:
Private Sub lblSubItem_MouseClicked (EventData As MouseEvent)

    Dim lblCardNumber As Label=Sender
    Log(lblCardNumber.Text)
  
End Sub

Thank you very much! Is it the same for mouse enter and mouse exit events? Also, I want to change the text color of the label when the mouse enters and exits the label in the subitem.
 
Upvote 0

Chris Guanzon

Active Member
Licensed User
Longtime User
B4X:
Private Sub lblSubItem_MouseEntered (EventData As MouseEvent)
    Dim lblSubItem As B4XView = Sender
    lblSubItem.TextColor = 0xffffffff
End Sub

Private Sub lblSubItem_MouseExited (EventData As MouseEvent)
    lblSubItem.TextColor = 0xFF898989
End Sub

It's working now just as I want it to be.
 
Upvote 0
Top