Skin a control with SVG Widget in Datagrid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

bwmilby
Posts: 462
Joined: Wed Jun 07, 2017 5:37 am
Contact:

Re: Skin a control with SVG Widget in Datagrid

Post by bwmilby » Wed Sep 30, 2020 1:56 pm

You can just set the height/width of the image. If you want to preserve the aspect ratio, you will need to do that manually as the image will scale in both directions to fill the rect.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Skin a control with SVG Widget in Datagrid

Post by marksmithhfx » Wed Sep 30, 2020 2:06 pm

bwmilby wrote:
Wed Sep 30, 2020 1:56 pm
You can just set the height/width of the image. If you want to preserve the aspect ratio, you will need to do that manually as the image will scale in both directions to fill the rect.
Attachments
Screen Shot 2020-09-30 at 2.05.37 PM.png
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Skin a control with SVG Widget in Datagrid

Post by marksmithhfx » Wed Sep 30, 2020 2:11 pm

Does anyone know if it's possible to call the svgiconfilter (list of SVG Icons) by script from a stack? I'd like to do something that combines both the output Brian's program produces and something like the following to display the presetname just by clicking on the image to fetch a new one.
Attachments
Screen Shot 2020-09-30 at 1.45.57 PM.png
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Skin a control with SVG Widget in Datagrid

Post by marksmithhfx » Wed Sep 30, 2020 2:18 pm

bwmilby wrote:
Thu Sep 24, 2020 2:48 am
Here is a tiny LCB library that will allow you to easily convert icons to drawings. It adds several handlers:
BTW, thank you Brian for releasing this. It's a very slick bit of code and will be handy to have. Is it possible to read an lce file to see how its done?

Cheers,
Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

bwmilby
Posts: 462
Joined: Wed Jun 07, 2017 5:37 am
Contact:

Re: Skin a control with SVG Widget in Datagrid

Post by bwmilby » Wed Sep 30, 2020 3:48 pm

In the “My Livecode/Extensions” folder is where you find the installed files. The actual .lcb file is located in the extension folder. It is quite simple - all of the hard work is done by the compile code.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Skin a control with SVG Widget in Datagrid

Post by marksmithhfx » Thu Oct 01, 2020 9:46 am

bwmilby wrote:
Wed Sep 30, 2020 3:48 pm
In the “My Livecode/Extensions” folder is where you find the installed files. The actual .lcb file is located in the extension folder. It is quite simple - all of the hard work is done by the compile code.
Wonderful, thanks. By any chance have you had any experience getting the list of SVG Icons to pop up using script from a stack?

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

bwmilby
Posts: 462
Joined: Wed Jun 07, 2017 5:37 am
Contact:

Re: Skin a control with SVG Widget in Datagrid

Post by bwmilby » Thu Oct 01, 2020 1:25 pm

Take a look at this thread:
http://forums.livecode.com/viewtopic.ph ... vgicontool

The SvgIconTool isn't exactly what you are asking for, but it does pull the icons from the current family and display them in a grid format. I'm pretty familiar with the Icon Family code since I submitted those changes.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Skin a control with SVG Widget in Datagrid

Post by marksmithhfx » Sun Oct 04, 2020 10:57 pm

bwmilby wrote:
Thu Oct 01, 2020 1:25 pm
Take a look at this thread:
http://forums.livecode.com/viewtopic.ph ... vgicontool

The SvgIconTool isn't exactly what you are asking for, but it does pull the icons from the current family and display them in a grid format. I'm pretty familiar with the Icon Family code since I submitted those changes.
Ok thanks. Will try and get to it this week. Appreciate the pointer.

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply