B4A Library [Class] Flexible Table

vecino

Well-Known Member
Licensed User
Longtime User
I understand. Thank you very much.
By the way, is a great job.
 

klaus

Expert
Licensed User
Longtime User
@zeuspower
By default the LoadSQLiteDB routine takes the DB column names as headers.
You can modify the headers with the SetHeader routine.
Unfortunately it changes the column widths.
I added the GetColumnWidths routine (TableV1_26 project) to read and mamorize the column widths to be able to reset the widths.
In the attached project you have an example, it's a workaround because it doesn't take into account yet to change the column width if new haeders are wider than the widest item in the column.
I will be absent the next four days so no chance for improvement, I will look for a better solution when I come back home.

Best regards.

EDIT:
Removed the zip file, the latest version is in the first post.
 
Last edited:

zeuspower

Member
Licensed User
Longtime User

Thanks ,i will check it out...
It Works ok...
But it has the problem you already said...
If the fields contents width ,happens to be shorter than the headers ,then the headers do an ugly wrap text,or even some text disappears(if the header height is small)
 
Last edited:

Espinosa4

Active Member
Licensed User
Longtime User
Hello everybody.

I am having problems with the last record/line with the cell selection and the Galaxy S3. I can click in any cell except the last cells of the bottom line. with other phone works fine.

Any idea?
Thanks

Cheers
Espinosa
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Do you have the problem when you run the example code from post #1 ?
It's difficult for me to give you, and others who have the same problem, a concrete advice because I cannot reproduce the problem on my devices.
If you have a different project could you post it as a zip file ?
 

Espinosa4

Active Member
Licensed User
Longtime User
Hi klaus!
I don't remember. I'll try to do a test and I will post the result. About the code I can upload the code. No problem

Cheers
 

Espinosa4

Active Member
Licensed User
Longtime User

Good evening klaus,

Finally I've tested the example added in the 1.27 zip file and I've the same problem. I can click in any cell except the last cells of the bottom line. My code it's the same that we can see into the example.

I've another strange case with my program where I can't write text in an edit object. It is on a tablet. Samsung Galaxy Tablet 8.9. Firstly, the edit is enabled = false. And after I turn the property to true. After that, I try to write text and nothing happens. I can't do it.

Cheers,
Espinosa
 

Espinosa4

Active Member
Licensed User
Longtime User
Hi, here the link klaus.
How I don't what files I can delete I uploaded in Dropbox.

https://db.tt/u11Aublu

I tested the program and the problem is in the add to activity on the variable height. Depends the value it works fine.

100%y doesn't work.
50%y works fine.

Cheers
Carlos
 

klaus

Expert
Licensed User
Longtime User
The problem is in this line:
Table1.AddToActivity(Activity, 0, 5dip, 100%x, 100%y)
You set the Top property to 5dip and the Height to 100%y
this means that the bottom of the Scrollview is below the bottom of the screen.
It should be
Table1.AddToActivity(Activity, 0, 5dip, 100%x, 100%y - 5dip)

But anyway, on my device even with the line above I can select the last line.
The only problem is that a small part is missing.

With, for example,
Table1.AddToActivity(Activity, 0, 5%y, 100%x, 100%y)
The last line is not displayed !
With
Table1.AddToActivity(Activity, 0, 5%y, 100%x, 95%y)
it is.

Best regards.
 

Espinosa4

Active Member
Licensed User
Longtime User
Ok but with 100%y I can see all the lines.
And if I use 50%y I don't have problems with vertical view but in horizontal view it is very difficult to do click on the cell.

My original height was 95%y but I made many tests to find the problem and 100%y was a mistake mine. Sorry.

Best regards
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Ok but with 100%y I can see all the lines.
With your code I see too all lines but the last one is a bit truncated !
Can't you really not select a cell in this line ?
And once again, if you run the test project in the first post can't you select a cell in the last line ?
I don't understand ???

Best regards.
 

Espinosa4

Active Member
Licensed User
Longtime User
It is.
I can't select in the test project a cell in the last line. it is not possible. I have pain in my finger

In my program with 95%y it is the same but if I use 50%y works ok in vertical screen and bad in horizontal screen. it is crazy !!

best regards.

maybe we need to call Mulder and Scully ))

By the way in my Galaxy S plus works all ok.
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Well, I tried your code with 50%y and now I see it too !
It is due to an internal Panel added by melamoud and I don't know exactly what he did.
It will need some more deep investigation to find what happens when, how and why.

Best regards.
 

Espinosa4

Active Member
Licensed User
Longtime User
Excellent!
There's a reason and this is very important!
Thank you very much indeed klaus for your valuable help! I am very sorry I can't help you more, I am only an amateur programmer.

Best regards
Espinosa
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…