What is the best way to create a image button in App Builder?


Mike Felker

I was using normal buttons to go to other scenes in the app, but the client wants the buttons to have images on them, so how do I create a image button?

Mike


Mike Felker

decsoft

Hello Mike,

You have two possible ways, for example, you can use buttons' icons, or you can use an Image control which can act like a button thanks to their Click and other events.



decsoft

Hello,

I forget another possible way to do it: use an HTML IMG tag in the "Text" property of the button, something like:

Suposing you previously add a "Ninja.png" image using the App's Files manager.



Yang Ghua

Set buttons' Text like this

button text

this will work!

but Set buttons' icon like this:

app/images/s1.jpg

does not work to me!


decsoft

Hello Joshua,

Set buttons' Text like this

button text

this will work!

but Set buttons' icon like this:

app/images/s1.jpg

does not work to me!

That's because the Button's icon expected the name of a font icon (one of the included in App Builder) and not an image path. If you want to use an image in the button you can use the below code in the button's Text property/variable:


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.