B4A Library [Class] Flexible Table

vbmundo

Well-Known Member
Licensed User
Hi,

I can capture a CellClick but, How can I Edit a Cell ?

I can't find any way to open the Keyboard by code.. then I could to open the Keyboard when the User click on some specifics columns

what you recommend?

Regards
 

Sberla

Active Member
Licensed User
Longtime User
Hello!
I am trying to add Table with designer but i can't fill it with data
dim tabella1 as tabella
tabella1.SetHeader(Array As String("Qnt", "Nome", "Importo"))
tabella1.AddRowAutomaticWidth(Array As String(quantita, NomeProdotto ,libs.ConvertiDecimale(importo)))

i have tried to set columns width :
tabella1.InitializeTable(3,Gravity.CENTER,False)
tabella1.SetHeader(Array As String("Qnt", "Nome", "Importo"))
tabella1.SetColumnsWidths(Array As Int(50dip, 145dip, 145dip,145dip))

but it crashes in the setcolumnswidths

If i implement it with code , not with the designer it works fine.
 

LucaMs

Expert
Licensed User
Longtime User
tabella1.SetColumnsWidths(Array As Int(50dip, 145dip, 145dip,145dip))
Non lo ricordo a memoria ma suppongo che quel SetColumnsWidths richieda la larghezza di ogni colonna, tu gli passi 4 valori ma hai 3 campi!

I suppose that SetColumnsWidths requires a value (width) for each column; you're passing 4 values to it but you have 3 fields only.
 
Last edited:

Sberla

Active Member
Licensed User
Longtime User
Ho provato anche con 3 valori ma da lo stesso problema
I have tried with 4 values and it crashes the same way
 

Sberla

Active Member
Licensed User
Longtime User
This is the code :

tabella1.InitializeTable(3,Gravity.CENTER,False)
Scales.SetRate((GetDeviceLayoutValues.ApproximateScreenSize/2.6)-1)
tabella1.SetColumnsWidths(Array As Int(50dip, 145dip, 145dip))
tabella1.SetHeader(Array As String("Qnt", "Nome", "Importo"))

This is the error

Error occurred on line: 442 (tabella)
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at java.lang.reflect.Array.setInt(Array.java:550)
at java.lang.reflect.Array.set(Array.java:417)
at anywheresoftware.b4a.shell.ArraysUtils.setElement(ArraysUtils.java:84)

If i set the header before setting the column widths i get this error :

tabella1.InitializeTable(3,Gravity.CENTER,False)
Scales.SetRate((GetDeviceLayoutValues.ApproximateScreenSize/2.6)-1)
tabella1.SetHeader(Array As String("Qnt", "Nome", "Importo"))
tabella1.SetColumnsWidths(Array As Int(50dip, 145dip, 145dip))

tabella1.ScaleTable(Scales.GetScaleX, Scales.GetScaleY, False)

This is the error :
Error occurred on line: 882 (tabella)
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
at it.arkosoft.ristomanager.tabella._setheader(tabella.java:391)
 

rhydo

Member
Licensed User
Longtime User
Hi,

i would like to know , how can i set different font color for individual cell. I Tried by changing the Sub "SetValue" in Table module, but the font color changes only on visible rows.not the bottom rows (rows which below the fold)
 

mojako

Member
Licensed User
is there anybody can help me please..
I'm problem when use .clearall while the table still contain data when I call .clearall
 

mojako

Member
Licensed User
This can be the most nice question I've read during these 3 years. [I'm not able to answer]
I curious to use table.removeRow(i) by looping the table. but unfortunately there's no function RowCount so that's no possible to looping and remove row.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…