SVG Icons

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 189
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

SVG Icons

Post by chipsm » Tue Oct 03, 2017 6:36 pm

Can SVG Icons be assigned to buttons?
And if so, how does on go about it?
I have not had any success with this.
Can one assign a script to a SVG Icon - because they are locked in the script screen with a password.
Clarence Martin

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1964
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria
Contact:

Re: SVG Icons

Post by richmond62 » Tue Oct 03, 2017 7:52 pm

Normally you'd set the icon of a button programmatically like this:

set the icon of button "xxx" to id 1005

where 1005 is the id of your target image

if you try this with the id of an SVG icon widget it does NOT work.

sphere
Posts: 473
Joined: Sat Sep 27, 2014 10:32 am
Location: the Netherlands

Re: SVG Icons

Post by sphere » Wed Oct 04, 2017 7:54 pm

indeed like richmond says.
but when you go to Sample Stacks in the Livecode top taskbar, then click svg and download SVG Powered Images
(a very very nice stack!)
Then use this as described for your own stack. Now you can import color SVG files as image.
then you can use the id of the image for your button, but...... you can not resize the image of the button as you would expect, like you can resize greatly with the image itself
Global Market Share WorldWide Android 84.82%
Global Market Share WorldWide iOs 12%

Just a wild guess that we need more support and features for Android than iOs...

chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 189
Joined: Wed May 11, 2011 7:50 pm
Location: Southern California

Re: SVG Icons

Post by chipsm » Thu Oct 05, 2017 4:04 pm

Thanks, I'll give it a try.
Clarence Martin

Post Reply

Return to “Talking LiveCode”