Android Question Flexible table, does not respect color columns.

vecino

Well-Known Member
Licensed User
Longtime User
Hi, I'm using a "flexible table" and some columns have defined colors, but when you touch on them, the color of the selected row prevails.
Is it possible to solve this?
Thank you.

B4X:
If Not(tbLotes.IsInitialized) Then 
  tbLotes.Initialize(Me,"tbLotes",10,Gravity.CENTER,False)               
  Dim tf() As Typeface
  tf = Array As Typeface(Typeface.DEFAULT,Typeface.DEFAULT,Typeface.DEFAULT,Typeface.DEFAULT,Typeface.DEFAULT,Typeface.DEFAULT_BOLD,Typeface.DEFAULT_BOLD,Typeface.DEFAULT,Typeface.DEFAULT,Typeface.DEFAULT)
  tbLotes.SetTypeFaces(tf)
  tbLotes.UseColumnColors = True               
  Dim iTexto, iFondo, iFondoNoTocar As Int
  tbLotes.RowHeight = 40dip
  tbLotes.HeaderHeight = tbLotes.RowHeight
  iTexto = Colors.Black
  iFondo = Colors.White
  iFondoNoTocar = 0xFFFFFECA               
  tbLotes.SetTextColors(Array As Int(iTexto,iTexto,iTexto,iTexto,iTexto,Colors.Blue,Colors.Blue,iTexto,iTexto,iTexto))
  tbLotes.SetColumnColors(Array As Int(iFondo,iFondoNoTocar,iFondoNoTocar,iFondoNoTocar,iFondoNoTocar,iFondo,iFondo,iFondo,iFondo,iFondo))
  tbLotes.AddToActivity(pnLotesFondo,0,pnLotesCabecera.Height,pnLotesFondo.Width,pnLotesFondo.Height-pnLotesCabecera.Height-pnLotesPie.Height)
  tbLotes.SetHeader(Array As String("id","Lote","Nombre","Stock Cajas","Stock Unids.","Cajas","Unidades","UXL","CV","UV"))
  tbLotes.RowColor1                = iFondo
  tbLotes.RowColor2                = iFondo
  tbLotes.SelectedRowColor = iFondo
  tbLotes.SelectedCellColor = iFondo
  If globales.itbLotesTextSize<10 Then globales.itbLotesTextSize=14
  tbLotes.TextSize = globales.itbLotesTextSize
  tbLotes.SetColumnsWidths(aiW)               
End If

 

vecino

Well-Known Member
Licensed User
Longtime User
Hi, so is it possible to always keep the colors chosen for the columns, regardless of whether the row is selected?
Thank you
 
Upvote 0
Top