iOS Question Change color of line in tableview

schimanski

Well-Known Member
Licensed User
Longtime User
I'm using a tableview from the iTableview lib. I'm not able to change the color of the lines between the tableview-items . The color is always grey. I have changed everything, without an effect. Did somebody know, where i could do that?


B4X:
Public tvKonferenzen As TableView
...
tvKonferenzen.Initialize("tvKonferenzen", False)
tvKonferenzen.RowHeight = 50
tvKonferenzen.Color=Main.ColorULVPanel
pageK.RootPanel.AddView(tvKonferenzen, 0,55dip,100%x, 100%y-55dip)
...
...
tvKonferenzen.Clear
For i=0 To ListeKonferenz.Size-1
  Dim tc As TableCell = tvKonferenzen.AddTwoLines("", "")
  tc.CustomView = CreateItem(ListeKonferenz.Get(i))
Next
tvKonferenzen.ReloadAll
...
...
Private Sub CreateItem(Konferenzbezeichnung As String) As Panel
    Dim p As Panel
    p.Initialize("")
    p.Color=Main.ColorULVPanel
    p.Height = tvKonferenzen.RowHeight

    Dim Profilbildbmp As ImageView
    Profilbildbmp.Initialize("Profilbildbmp")
    Profilbildbmp.ContentMode=Profilbildbmp.MODE_FIT
    p.AddView(Profilbildbmp, 20dip,0,50dip, 50dip)

    Dim lblKonferenz As Label
    lblKonferenz.Initialize("lblKonferenz")
    lblKonferenz.Font=Font.CreateNewBold(19)
    p.AddView(lblKonferenz, 100dip, 0, tvKonferenzen.Width, 25dip)

    Dim lblZeitstempel As Label
    lblZeitstempel.Initialize("lblZeitstempel")
    p.AddView(lblZeitstempel, 100dip, 25dip, tvKonferenzen.Width, 25dip)


    lblKonferenz.TextColor=Main.ColorTitle

    p.Width=tvKonferenzen.Width

    Return p

End Sub

b1.png
 

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,
Here:
B4X:
Sub SetSeparatorColor(TV As TableView, Color As Int)
    Dim NaObj As NativeObject = TV
    NaObj.RunMethod("setSeparatorColor:",Array(NaObj.ColorToUIColor(Color)))
End Sub

Sorry I was too fast, use the SeperatorColor property of the TableView ;)

Jan
 
Last edited:
Upvote 0
Top