Actually i need it just for this reason ahahha.
I have a panel, with a label inside, i need only the the panel touch event. But if i tap on the label (lblNomeZona) the panel_touchevent (pnlWhiteShadow) does not fire
I created a transparent panel with a label inside it as Erel instructed you and I was able to get the Panel touch event to fire:
B4X:
Private Panel1 As B4XView 'in globals
Private Label1 As Label
Private xui As XUI
Activity.LoadLayout("Layout1") 'in activity_create
Panel1.SetColorAndBorder(xui.color_transparent,4dip, xui.Color_Magenta,5dip)
Private Sub Panel1_Touch (Action As Int, X As Float, Y As Float)
Label1.Text="Mike1970"
End Sub
I created a transparent panel with a label inside it as Erel instructed you and I was able to get the Panel touch event to fire:
B4X:
Private Panel1 As B4XView 'in globals
Private Label1 As Label
Private xui As XUI
Activity.LoadLayout("Layout1") 'in activity_create
Panel1.SetColorAndBorder(xui.color_transparent,4dip, xui.Color_Magenta,5dip)
Private Sub Panel1_Touch (Action As Int, X As Float, Y As Float)
Label1.Text="Mike1970"
End Sub
You are so smart. How can we tell if it is yours or not. I wish others name them differently. I got so confused.
So what Erel is telling is change this line in the class module :
This is the one from Erel. Highly recommend it. I have used before. I wish other developers give their libraries distinctive names different than what Erel uses. It is not fair to him. I spent over an hour this morning trying to solve your puzzle so I can help, thinking it was Erel's class module.:
When you set the text of this custom label the text size is automatically modified to the largest possible size so that all the text is visible. To use this view in your project, you should take the AutoTextSizeLabel class from the attached example and add it to your project. You should then...
This is the one from Erel. Highly recommend it. I have used before. I wish other developers give their libraries distinctive names different than what Erel uses. It is not fair to him. I spent over an hour this morning trying to solve your puzzle so I can help, thinking it was Erel's class module.:
When you set the text of this custom label the text size is automatically modified to the largest possible size so that all the text is visible. To use this view in your project, you should take the AutoTextSizeLabel class from the attached example and add it to your project. You should then...
I don't remember why i choosed, the other one, probably the original one gave me problem and i switched to the other.
Also, the Erel's one is cross-platform? or only b4a?