#1 2016-07-26 16:13:21

karmacomposer
Member
From: Wesley Chapel, Florida
Registered: 2016-05-04
Posts: 84
Website

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

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

Offline

#2 2016-07-26 16:14:43

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

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

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.

Offline

#3 2016-07-26 16:31:36

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

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

Hello,

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

<img src="app/images/Ninja.png" /> Hello world

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

Offline

#4 2016-10-25 09:30:19

reg4app
Member
Registered: 2016-05-16
Posts: 147

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

Set buttons' Text like this

<img src="app/images/s1.jpg" align="left"/>  button text

this will work!

but Set buttons' icon like this:

app/images/s1.jpg

does not work to me!


Joshua.Y

Offline

#5 2016-10-25 09:32:30

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

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

Hello Joshua,

reg4app wrote:

Set buttons' Text like this

<img src="app/images/s1.jpg" align="left"/>  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:

<img src="app/images/Ninja.png" /> Hello world

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.