zooming slider

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ace
Posts: 4
Joined: Sun Jan 05, 2014 10:56 am

zooming slider

Post by ace » Sun Jan 05, 2014 11:41 am

I'm trying to resize several controls like graphics, images, buttons, etc...

i want to use the slider in doing this but i don't know the code.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: zooming slider

Post by Klaus » Sun Jan 05, 2014 12:50 pm

Hi ace,

1. welcome to the forum! :D

2. Please only ONE posting per question, I deleted the duplicate of this thread.

3. What exactly are you trying to do?
Do you want to let the USERS of your app resize the user elements?
Or would you rather use a slider for resizing objects in the IDE?
You would need to add that functionality to the IDE by yourself 8)

I would higly recommend to check these stacks to get the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html


Best

Klaus

ace
Posts: 4
Joined: Sun Jan 05, 2014 10:56 am

Re: zooming slider

Post by ace » Sun Jan 05, 2014 3:55 pm

i have a group of objects and in order for users to view these clearly, i want to add a slider for them to use in zooming in and out.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: zooming slider

Post by Klaus » Sun Jan 05, 2014 4:13 pm

HI ace,

not an easy task, since you cannot resize a group "en bloc"!
You need to resize all the objects in a group separately,
while keeping their relative postitions etc.

Can't you use a screenshot/image for this?
Will of course only work if the objects are only displayed and
not functional like buttons or fields.

In any case you need to script the "on scrollbarbdrag" message of your slider!
It comes with a parameter = the actual current "thumbposition" in "real time"!

Example:

Code: Select all

on scrollbardrag tValue
  set the width of btn "a button" to tValue
end scrollbardrag
Best

Klaus

Post Reply