No, it has no events, nor would adding it to a panel work.Or should it be placed inside a panel for events?
This time we will wait for Erel to add it; it's easier ?I had to add some events that I needed, some time ago.
????
?
This time we will wait for Erel to add it; it's easier
Indeed, I have a transparent panel holding a B4XImageView in the items layout of an xCLV. I bring the panel to the front. and I raise the panel click event to change the shape of the B4XImageView:Adding a panel should work.
Private Sub Panel1_Click 'to create a pseudo raise click event of B4XImageView1 by clicking the panel that holds the img
Dim index As Int = CustomListView1.GetItemFromView(Sender)
Dim pnl As B4XView = CustomListView1.GetPanel(index)
Dim b4xiv As B4XImageView = pnl.getview(1).GetView(0).Tag 'B4XImageView1 is 1st view of panel1. Panel1 is the 2nd view in item layout
If b4xiv.RoundedImage =True Then
b4xiv.RoundedImage = False
Else
b4xiv.RoundedImage =True
End If
End Sub
Indeed... you had to do it.Indeed
Why not just create you own custom view with the B4xImageView on a panel, and handle the events you want. You only have to do it once and you can reuse the custom view without editing the original B4xlib. You could even make it cross platform.I will have to do it for myself and insert the class in the B4Xlib every time it is updated. Not a good thing.
Yes, I could, but I don't like it too much. I did it for xCustomListView, so I have my lmCustomListView (and two other).Why not just create you own custom view with the B4xImageView on a panel, and handle the events you want. You only have to do it once and you can reuse the custom view without editing the original B4xlib. You could even make it cross platform.
Why not just create you own custom view with the B4xImageView
lmB4XComboBoxYes, I could, but I don't like it too much. I did it for xCustomListView, so I have my lmCustomListView (and two other).
I can agree if, as I did creating my DBSearchView by modifying the original SearchView because the change is specific and "heavy".We will have to agree to disagree on this one. One of the advantages of customviews is that it allows quick customization for exactly this type of situation.
You seem to have made the same decisions as me.
I'm not sure what you mean. And I guess it depends what additional functionality you want to implement. If you modify a B4xView directly and a new version is released, you have to remember to update your version if you want the new functionality. In this case with a customview, you can add an existing B4xImageView to a panel and catch the events on the panel as the B4xImageView just ignores the events so they are passed straight through. When a new version is released, you don't need to do anything as long as the new functionality doesn't conflict, as it will automatically use the new version.Making a view over other views has no difference with modifying the existing one.