iOS Question extend object or view

ivanomonti

Well-Known Member
Licensed User
Hi;

how can I extend an object (panel) with containers of objects outside of the tag!
 

ivanomonti

Well-Known Member
Licensed User
now proceed in this way, but I do not know whether to call it a good way

B4X:
Sub setImagePanelButton(p As Panel, value As Object, nameimage As String, left As Int, top As Int, width As Int, height As Int)
    '
    Dim lis As List
    lis.Initialize
    lis.Add(nameimage)
    lis.Add(value)
    '
    Dim pico As Panel
    pico.Initialize("pico")
    pico.tag = lis
    p.AddView(pico.Pane,left,top,width,height)
    ' creo object bitmpa
    Dim bmp As Bitmap
    bmp.Initialize(File.DirAssets,nameimage)
    ' imposto rettangolo
    Dim rec As Rect
    rec.Initialize(0,0,width,height)
    ' tela dove visualizzo la bitmap
    Dim cv As Canvas
    cv.Initialize(pico.Pane)
    cv.DrawBitmap(bmp,rec)
    cv.Refresh
    '
End Sub
 
Upvote 0
Top