Insert image in label text

Nice Idea, but there’s a problem.
With my app allow the user to input the text in the label, using “key words” with symbols before save in gallery their creation.
With a webviewer is possible to do this? or is only a “window” where a portion of my html page is visible and unchanging?

I don’t know how familiar you are with HTML , but you can make a page that accepts strings thru GET or POST methods. Example mypage.html?string1=Andrea&string2=Petricola.
Then use string1 and string2 separately inside the html to format your fake label anyway you want.

A more practical solution will be to create some sort of template for your fake label with image and label components inside an arrangement. This is an example, you will place the components according to your needs, of course.

ok wait, I’m not familiar with HTML up to this point unfortunately, but you are telling me that if, for example, I created an HTML page that contains a list of images that can be recalled via a string, I can simply “replace” a portion of text with this string to display the image in the label?

Example:
“I Love The Sea.”

would become, replacing “Sea”:

“I Love the ‘string that displays the image’.”

is this correct or am i wrong?

Actually, I made a mistake. To read the string passed to the little html page you will need a PHP server, which is not available in the webviewer.

However, If all you need is to have little icons at the beggining of a sentence, the best solution for your problem is to use a font that has those icons incorporated.

There is no such font, because I create the icons directly.
Is there a way to insert icons that I create inside a specific font?

Yes, not an easy task but doable for sure. You can use Fontforge to create or modify your own font file.

Great! I try immediately, although difficult I want to be able to insert those icons.
I also know what type of font to modify.
Thanks so much!

1 Like

Apparently there seems to be no solution.
With FontLab (another program who create and modify fonts) I tried to insert my icons in a totally new font, instead of not useful symbols inside the label text.
on the PC they see PERFECTLY, just as I wanted … but in the app and also in the companion the icons are converted to SVG in black and white.
And if I try to insert colored SVG icons in the font, they are not displayed in the least.
I don’t know what else to do.

1 Like

@Italo had a great idea

and concerning this

why don’t you just use a textbox and then pass the entered text to the webviewer to display it?

Taifun

1 Like

As a last resource, maybe you can ask extensions developers if they can come up with a label component capable of doing what you need. It may not be free though.
But if I were you, I think I would have to find an alternative way of displaying your information using what it is available in Kodular. Adapt your app to Kodular posibilities, and not the other way around.


Maybe this can help you

I don’t think so, because here the original user wants to insert self created images which I don’t think is possible with HTML(specifically in a Label)

Italo in his next post he corrected himself saying that to do this you needed a PHP server and this was not possible with a webviewer

you do not need a php server…
I once invented this App Inventor Tutorials and Examples: HTML Label | Pura Vida Apps

Taifun

1 Like

@Taifun
The link to download test apk is broken in the article which you mentioned above. Can you check it?

Thank you for letting me know… I now uploaded it into Google Play Beta
It should be available there soon at this opt in link

Taifun

1 Like

I am in fact using a textbox to insert the input to whoever uses the application. This input must then be inserted inside the label.
To recall the icons created by me, you must press buttons that will generate in the textbox the characters that recall those icons (if I change the font) or the code string.
In the webviewer, the problem of displaying the icons that the label will solve and will display correctly?
Why I repeat: on PC they see PERFECTLY, it is on mobile and companion that gives problems

I was thinking about the parameter passed in the url, like ?name=Italo&country=usa
I haven’t used html in a long time, so I may not remember if you can parse those without php. I thought you can’t.