Stacks and content being resized

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

Post Reply
WarrenW
Posts: 27
Joined: Tue Oct 02, 2012 4:26 pm

Stacks and content being resized

Post by WarrenW » Fri Oct 05, 2012 4:56 pm

Hi,

I received an email from support saying that stacks are re-sized on different resolutions but I will still need to resize the content. I was hoping everything would be re-sized automatically. So if I write an app to fit on the screen on an original iPhone with the resolution of 320x480 where everything looks right on the screen and just dragged the content there so no coding to position anything. And then ran it on an iPhone 4 with resolution of 640x960. Would the content be positioned in the upper left corner of the iPhone 4 screen? I wish it would center the content. Of if it was positioned for the iPhone 4 and the played on the smaller resolution it would move the content. No?

Thanks!

Warren

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Stacks and content being resized

Post by Mark » Fri Oct 05, 2012 5:10 pm

Hi Warren,

I made a stack and posted it on the forum yesterday. It includes some resizing routines that might be useful for you. You can download it here.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

WarrenW
Posts: 27
Joined: Tue Oct 02, 2012 4:26 pm

Re: Stacks and content being resized

Post by WarrenW » Fri Oct 05, 2012 5:28 pm

Thanks. So does this mean what I said will happen if I drop controls on the screen for 320x480 and then run in a 640x960 - will they show in the top left corner?

I'll look at what you linked to now.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Stacks and content being resized

Post by Mark » Fri Oct 05, 2012 5:39 pm

Warren,

Usually, I make stacks with the right resolution before running them on a device, but I have seen too small a stack being centered on an iPad and another one positioned in the top-left on an Android device. I don't know whether this depends on the device or on the operating system of the device.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

cylent
Posts: 15
Joined: Tue Sep 25, 2012 9:04 am

Re: Stacks and content being resized

Post by cylent » Tue Oct 09, 2012 11:58 am

very nice. except when i hit test it says: "Unknown deployment platform". weird. (Developing for android)

quick question though:

if i want ONLY the re-size function do i just copy that section? i just like how i can resize and it refits things.
do i just copy that function into my "stack" and i am good?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Stacks and content being resized

Post by Mark » Tue Oct 09, 2012 12:10 pm

Hi cylent,

No, you don't. It is just an example of how resizing might work.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply