image sizing in LC

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
ValiantCuriosity
Posts: 128
Joined: Thu Jun 30, 2016 3:08 am

image sizing in LC

Post by ValiantCuriosity » Wed Jul 06, 2016 10:48 pm

In CSS,I can control the size of any image using ems or percentages.

Inline style examples below:

Code: Select all

<img src="{imageurl}" style="width:5em;height:5em;border:#000;border-style:solid; border-width:thin;">

Code: Select all

<img src="{imageurl}" style="width:50%;height:auto;border:#000;border-style:solid; border-width:thin;">
So, if my image is originally a large one, I can scale it in CSS to resize automatically to the screen size across a variety of devices. That is, 5em will display properly on all devices.

Is there a way to do this in LC?

I can find some references to creating a multitude of image sizes and stack sizes for a variety of devices. I've found some docs on responsive design, but, again, I'm looking for an easier way than those given in the references that I've found. Most of these solutions are based on older versions of LC. I'm thinking that perhaps, LC 8 has some updated way of dealing with device screen sizes.


TIA -Rachel
May I never be cured of my curiosity! :D

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: image sizing in LC

Post by Simon » Thu Jul 07, 2016 1:03 am

Hi Rachel,
I'm guessing you are talking about mobile?
Here are some lessons;
http://lessons.livecode.com/m/15262/l/1 ... ll-devices
http://lessons.livecode.com/m/4071/l/15 ... e-an-image
You will see several more image lessons on those pages.

SImon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ValiantCuriosity
Posts: 128
Joined: Thu Jun 30, 2016 3:08 am

Re: image sizing in LC

Post by ValiantCuriosity » Thu Jul 07, 2016 2:24 am

Thanks Simon,
I'll check the links out and proceed to pester you with more questions.

I'm finding lots to like about LC and many challenges too. :D

-Rachel
May I never be cured of my curiosity! :D

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”