When I do the following
I get just what I wanted a Cover Art Icon that looks like below Image - 1.
But when I click on the Image the CoverArt_MouseClicked routine does not get called
if I change the code to put the ImageView in a Pane like below
NOW my ImageView mouseclicked routine gets called but the CoverArt Images look nothing like what I want or need. See Image-2
So I am confused how to get the CoverArt to look like I want and be able to get a MouseClicked on it.
Thanks
BobVal
B4X:
Dim TrackInfo As TTrackInfo
Dim FileName As String
If Files.Size = 0 Then Return
FileName = Files.Get(0)
Files.RemoveAt(0)
Dim Columns(mTableView.ColumnsCount) As Object
TrackInfo = ReadMP3File(FileName)
Columns(0) = (mTableView.Items.Size+1)
If TrackInfo.CoverArt <> Null And TrackInfo.CoverArt.IsInitialized Then
Dim CoverArt As ImageView
CoverArt.Initialize("CoverArt") ' ******* CoverArt_MouseClicked
CoverArt.Tag = TrackInfo
CoverArt.PreserveRatio = True
CoverArt.SetSize(60, 60)
CoverArt.SetImage(TrackInfo.CoverArt)
Columns(1) = CoverArt
Else
Columns(1) = ""
End If
Columns(2) = TrackInfo.Artist
Columns(3) = TrackInfo.Album
Columns(4) = TrackInfo.Number
Columns(5) = FormatTime(TrackInfo.Duration)
Columns(6) = TrackInfo.Song
Columns(7) = TrackInfo.FileName
Columns(8) = TrackInfo.FilePath
mTableView.Items.Add(Columns)
If Files.Size > 0 Then CallSubDelayed2(Me, "DoTracks", Files)
I get just what I wanted a Cover Art Icon that looks like below Image - 1.

But when I click on the Image the CoverArt_MouseClicked routine does not get called
if I change the code to put the ImageView in a Pane like below
B4X:
Dim TrackInfo As TTrackInfo
Dim FileName As String
If Files.Size = 0 Then Return
FileName = Files.Get(0)
Files.RemoveAt(0)
Dim Columns(mTableView.ColumnsCount) As Object
TrackInfo = ReadMP3File(FileName)
Columns(0) = (mTableView.Items.Size+1)
If TrackInfo.CoverArt <> Null And TrackInfo.CoverArt.IsInitialized Then
Dim CoverArtHolder As Pane
Dim CoverArt As ImageView
CoverArt.Initialize("CoverArt")
CoverArt.Tag = TrackInfo
CoverArt.PreserveRatio = True
CoverArt.SetSize(60, 60)
CoverArt.SetImage(TrackInfo.CoverArt) ' PUTTING CoverArt in Contained allows CoverArt_MouseClicked to get called - BUT my image is not right
CoverArtHolder.Initialize("")
CoverArtHolder.AddNode(CoverArt, 0, 0, -1, -1) ' TRIED 60, 60 instead of -1, -1 but same result - NARROW box.
Columns(1) = CoverArtHolder
Else
Columns(1) = ""
End If
Columns(2) = TrackInfo.Artist
Columns(3) = TrackInfo.Album
Columns(4) = TrackInfo.Number
Columns(5) = FormatTime(TrackInfo.Duration)
Columns(6) = TrackInfo.Song
Columns(7) = TrackInfo.FileName
Columns(8) = TrackInfo.FilePath
mTableView.Items.Add(Columns)
If Files.Size > 0 Then CallSubDelayed2(Me, "DoTracks", Files)
NOW my ImageView mouseclicked routine gets called but the CoverArt Images look nothing like what I want or need. See Image-2

So I am confused how to get the CoverArt to look like I want and be able to get a MouseClicked on it.
Thanks
BobVal