Place a label or textbox on image

Hello experts i would like to ask you if there is a way to place a label or a textbox on an image.
Besides that i would also like to ask if i can place the labels in the middle of the image instead the beginning or the end of the line.

I have drawn a picture, and i want to show the temperature that i will be reading on the image in a specific location.

Best regards Panagiotis

Put the Label in a Vertical or Horizontal Arrangement with that image in the background.
and pad it with blank colorless Labels?

1 Like

Hello and thank you very much for your reply!!. Very nice catch!!! but have a look at the image i uploaded. How can i place the labels in the positions that the arrows are showing?

Thank you again very much !!


please include screenshots of your blocks into your post like this

I have changed my mind.

How about using the image as background of a Canvas,
and drawing the text of your text box inputs onto the canvas at locations appropriate to the textbox?

You might need to fit text locations by % of Canvas Height and Width.

Very nice approach..!! But this solves only one of the problem. Because i want to place a label or a textbox to these places, and keep updating their values every 2 seconds.... This will be done through bluetooth. This app will constantly read temperatures from these 4 points and i thought that it would be nicer to have these values in the drawing instead of a single line.

Hope to find a solution...

p.s I am new user to appinventor and i really find it unbelievable to have such a big problem in so simple programming task. (placing text to a specific location at the screen...)

Hello !
Any news about this topic, I cant belive that it is not possible to place objects to specific location on screen !?

In the next version ai2, nb187, it will be possible to freely arrange items on the screen and to move them. In my opinion, this will allow the components to overlap, and you will be able to decide which element should be on top. If you are interested in a label, you can use my extension which allows you to move the label to any place specified in pixels.

Dear sir
Thank you for your super fast reply. Placing label freely on screen would be perfect, any chance you coud send me a link to your extension?

You can try them out. There are methods to shift by a specific value. In android, it is also possible to set X and Y in a specific place, this is not in the extension, but if someone needs it, I can add it.

If you don't want to use extensions, you could try specifying your image as the background of an Arrangement containing transparent Horizontal and Vertical Arrangements wrapping your Label, and vary the sizes of the wrapping Arrangements.

If possible, could you please apprise when this said update is coming out?

Can I rake this up and ask whether there was any solution to it?
I want to do something similar. I want to write a text on an image-sprite for a game. Fish with words on them swim around on the screen.

How many words?
Do you know them in advance?

How many fish? :smiley:

this discussion shows how to make the fish swim ImageSprite flip when edge reached - #8 by Shaun_Horgan

Use a different sprite for each fish. write the words on each sprite image with an image editor might work?

Oh, they do swim. I need to find a way to write random words on the fish and move along with them. I need a way to put an image on an image-sprite (for each letter, I would have a small image and create the words that way) OR find a way to move a canvas around the screen.

At least a hundred different words. About 10 fish will swim with their randomly chosen words, and the child has to touch the fish with the right word.
For children who learn to read.

At least a hundred different words. About 10 fish will swim with their randomly chosen words, and the child has to touch the fish with the right word.

You might be able to do this without a Canvas and Sprites, if you use buttons in Arrangements.

A Button can have text in front of an image, right?

If a full screen Vertical Arrangement has an aquarium background image , and includes a stack of 10 Horizontal Arrangement tracks for the Buttons, the buttons could be made to move left/right independently on their tracks.

Pad each Horizontal Arrangement track with something clear (an empty Arrangement or Label) on each side of the Button on that track, adjusting their widths to nudge that track's Button left or right under Clock Timer control.

When a Button reaches the edge of its Arrangement, replace its image with the opposite-pointing image of its current fish image.

1 Like