Android Question [Solved] display on Scrollview with Label?

anOparator

Active Member
Licensed User
Longtime User
This displays the db column 'Name' on a Label view
B4X:
Sub Globals
   Private descripz As Label
End Sub
B4X:
Sub maincPic_LongClick
   descripzPic.Bitmap = ri.CreateBitmap(LoadBitmap(File.DirDefaultExternal,"Picture.jpg"))
   Dim desCur As Cursor = SQL1.ExecQuery("SELECT Name FROM MyTable WHERE _id = " & lstRowIDs.Get(pos))
   desCur.Position = 0
   descripz.Text = (desCur.GetString("Name"))   
End Sub
How would the same content be displayed on a Label in a Scrollview?

thanks for all references.
 

Attachments

  • scroLbl.zip
    109.2 KB · Views: 122

mangojack

Expert
Licensed User
Longtime User
This displays the db column 'Name' on a Label view

You Table name is ' stuff ' and I have changed ' descript ' to ' lblDescript '
The Label is updated in Button1_Click event. .. lstRowIDs was only initialized for a certain device size ?

You might look at declaring and initializing Sql and List in the Starter service. (at least SQL)
 

Attachments

  • ScrLBL 2.zip
    109.7 KB · Views: 127
Last edited:
Upvote 0

anOparator

Active Member
Licensed User
Longtime User
You Table name is ' stuff ' and I have changed ' descript ' to ' lblDescript '
The Label is updated in Button1_Click event. .. lstRowIDs was only initialized for a certain device size ?

You might look at declaring and initializing Sql and List in the Starter service. (at least SQL)
Thanks for the insight.
It took a while for me to replace Button1 with my increment and decrement buttons but I'm happy. I'm publishing as soon as I polish the appearance of my second B4a app. And I will study the non-working and working code.
thanks again.
 
Upvote 0
Top