Page 1 of 1
SVG Icons
Posted: Tue Oct 03, 2017 6:36 pm
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.
Re: SVG Icons
Posted: Tue Oct 03, 2017 7:52 pm
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.
Re: SVG Icons
Posted: Wed Oct 04, 2017 7:54 pm
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
Re: SVG Icons
Posted: Thu Oct 05, 2017 4:04 pm
by chipsm
Thanks, I'll give it a try.