SeteoColumna("SALDO", "CENTER", "RIGHT",2,2,-1)
SeteoColumna("CODIGO", "CENTER", "RIGHT",0,0,xui.Color_ARGB(255,138,43,226))
'******************************************************************************
'* SeteoColumna() Permite Setear ALINEACION,DECIMALES y COLOR a una columna. *
'* Recibe: columnID ---> Nombre COLUMNA, String *
'* alignmentV -> Alineacion Vertical, Strinng *
'* alignmentH -> Alineacion Horizantal, Strinng *
'* nMax -------> Maximo Decimal, Int [-1]=NO aplica *
'* nMin -------> Minimo Decimal, Int *
'* clr --------> COLOR, Int [-1]=NO aplica *
'*************************************************************** 12-05-2020 ***
Sub SeteoColumna(columnID As String, alignmentV As String, alignmentH As String, nMax As Int, nMin As Int, clr As Int)
Dim column As B4XTableColumn = B4XTable1.GetColumn(columnID)
Dim c As B4XTableColumn = B4XTable1.GetColumn(columnID)
Dim formatter As B4XFormatter
formatter.Initialize
c.Formatter = formatter
'Seteo ALINEACION
For i = 1 To column.CellsLayouts.Size - 1 'comienza en 1 debido al encabezado
Dim pnl As B4XView = column.CellsLayouts.Get(i)
pnl.GetView(0).SetTextAlignment(alignmentV, alignmentH)
Next
'Seteo DECIMALES si el parametros es distinto de -1
If nMax <> -1 Then
c.formatter.GetDefaultFormat.MaximumFractions = nMax
c.formatter.GetDefaultFormat.MinimumFractions = nMin
End If
'Seteo COLOR si el parametros es distinto de -1
If clr <> -1 Then
c.Formatter.GetDefaultFormat.TextColor = clr
End If
End Sub