How to divide card with/in 3 vertical lines?

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 28 17:08:35 EDT 2020


On 10/28/20 1:04 PM, William de Smet via use-livecode wrote:
> I need 3 vertical lines in my iOS app with equal distance and from top to
> bottom.

   put the width of this cd/4 into tHLoc
   put the height of this cd/2 into tVLoc
   set the loc of grc "line1" to tHLoc,tVLoc
   set the loc of grc "line2" to tHLoc * 2,tVLoc
   set the loc of grc "line3" to tHLoc * 3,tVLoc

This works best if the width of the card is evenly divisible by 4. Fractional locations don't 
always work, the engine will just round them to the nearest pixel. I also tried div instead of 
"/" which on my test stack worked a little better.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list