Hello, I have a grid that shows data from a database in rows of labels. When I click on a label, it turns into an EditText and shows the stored data. The width isn't changed when the label is turned into an EditText.
Now, I'd like to adjust the height of the EditText to the length of the string stored in the cell in the database. The contents is always displayed with a height of 40dip in the label that is shown in the grid, but if I want to edit the contents, I'd like to see the whole contents at once by adjusting the height of the EditText.
I came to the following rather rooky solution, that surely only fits for my setup (10.1'', 160 dpi):
Is there a more elegant and less screen dependent way to do such a thing?
Thanks
Now, I'd like to adjust the height of the EditText to the length of the string stored in the cell in the database. The contents is always displayed with a height of 40dip in the label that is shown in the grid, but if I want to edit the contents, I'd like to see the whole contents at once by adjusting the height of the EditText.
I came to the following rather rooky solution, that surely only fits for my setup (10.1'', 160 dpi):
B4X:
edText.height = sf.Len(CurrentText) / 15 * 30dip + 10dip 'where sf is library string functions
Thanks