SQLite Form type activity

aklisiewicz

Active Member
Licensed User
Longtime User
I have a form with several fieds (in this case thay are all read only)
My table has several columns which are declared a TEXT() (these are columns which wshould display multiple lines of text (like a MEMO() in MySQL.
I created appropriate fields in Designer to display the data from the database for the TEXT columns but I'm having problem implementing it.

I'm not sure how would I make the field height for 4 or 6 lines
and place data text into it

Art
 

aklisiewicz

Active Member
Licensed User
Longtime User
Thanks ro reply Erel, but could you be more specific...

I come from 4GL environments where all those tedious tasks are automated so one was able to concentrate on the data flow and not so much on the interface details. In this case lots of stuff is new to me (as probably to others). I feel a little like I'm making step backwards...dealing with all those details.


I would like to grasp the whole idea how the text fields are handled. I hate the term 'Text Field" because it confuses me with the regular string type fields, but that's what they call it in SQLite. MySQL term MEMO() field is much more appropriate, but any way...

say...

I have a Description field in a database and want to read that field from the record, then display it on the screen. What type of view shall I use ?

EditText? Label? or something else ?

Is any special preparation required? another words if there is more text that can fit into the field would it scroll automatically ?


Arthur


PS>
BTW, one other question: does B4A provide any type of mechanism or automatic field validation ?
 
Upvote 0

devlei

Active Member
Licensed User
Longtime User
Use the EditText view and for its properties make sure SingleLine= False and Wrap=True.
Then resize the view on your form according to how much space you have available and according to how much text is normally present. It will move down automatically if there is more text than available space, but does not have scroll bars.
Different devices have different amounts of screen space, so use 'Designer Scripts' with SetTopAndBottom & SetLeftAndRight to enable your view to stretch on bigger screens.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can use CustomListView class if you want to have a scrollable text.

EditText should be used for editable fields and Label should be used for non-editable fields.

does B4A provide any type of mechanism or automatic field validation ?
Which type of validation are you looking for? You can set the EditText InputType to numbers if you only want to accept numbers. For more complicated validations you will need to manually code it.
 
Upvote 0

aklisiewicz

Active Member
Licensed User
Longtime User
OK, this is clear now.

In the desktop Apps I developed in the past the text in front of the field was called "Prompt", so I'm assuming for the Prompt I would use "Label" in B4A correct ?

Art
 
Upvote 0
Top