SVG Icons

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm

SVG Icons

Post by chipsm »

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
chipsm@themartinz.com
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: SVG Icons

Post by richmond62 »

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: 1145
Joined: Sat Sep 27, 2014 10:32 am

Re: SVG Icons

Post by sphere »

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
chipsm
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 244
Joined: Wed May 11, 2011 7:50 pm

Re: SVG Icons

Post by chipsm »

Thanks, I'll give it a try.
Clarence Martin
chipsm@themartinz.com
Post Reply