how to rotate stack 90 degrees

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

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

how to rotate stack 90 degrees

Post by keram » Sat Feb 07, 2015 5:10 am

Hi,

Is there a way to rotate the stack in IDE by 90 degrees after opening it?
I want to redesign my stack to large tablet dimensions 1600x2560 but have a 13" screen. When using this:
set the scaleFactor of stack "hugeStack" to .25 the squares for resizing the fields etc in edit mode are tiny - it's hard to see them. So I'd like to tilt the stack 90 degrees and skip the scaling.

And, is this a good solution to create a largest possible stack suitable for a large tablet and then use
set the fullscreenmode of me to "exactFit so that the app will fit for smaller devices?

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

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

Re: how to rotate stack 90 degrees

Post by Klaus » Sat Feb 07, 2015 12:22 pm

Hi Keram,

you cannot rotate a stack! 8)
You will need to "fake" this by setting height/width etc...


Best

Klaus

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: how to rotate stack 90 degrees

Post by keram » Sat Feb 07, 2015 12:44 pm

Tanks Klaus,

"Faking" will not work because the buttons and fields will stay horizontal while with real rotation they would also rotate into vertical.
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

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

Re: how to rotate stack 90 degrees

Post by Klaus » Sat Feb 07, 2015 1:00 pm

Ah, OK, sorry, then you are out of luck, I'm afraid.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10081
Joined: Fri Feb 19, 2010 10:17 am

Re: how to rotate stack 90 degrees

Post by richmond62 » Sat Feb 07, 2015 2:04 pm

Here's how to fake rotating a stack:

https://www.dropbox.com/sh/ja47l87gg87s ... C5ORa?dl=0 file "rotate stack.livecode.zip"

Hard work!
rotateS1.jpg
rotateS2.jpg

Click on the silly arrow in the middle!

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

Re: how to rotate stack 90 degrees

Post by Klaus » Sat Feb 07, 2015 3:40 pm

Hi Richmond,

nice try, but that's not what keram wanted:
keram wrote:"Faking" will not work because the buttons and fields will stay horizontal while with real rotation they would also rotate into vertical.
:D


Best

Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10081
Joined: Fri Feb 19, 2010 10:17 am

Re: how to rotate stack 90 degrees

Post by richmond62 » Sat Feb 07, 2015 3:47 pm

Vertical fields . . . LOL

Maybe that should be a feature request.

Wait a minute:

What on earth does rotating the fields into vertical mean?
rotateCRUDh.jpg
rotateCRUD2.jpg
Keram-ji, would be glad if you could explain a bit more clearly what you want to do :)

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: how to rotate stack 90 degrees

Post by keram » Sat Feb 07, 2015 4:28 pm

Thanks Richmond for another magical stack - all your stacks are magical :D
But it's not really what I wanted to achieve. It is this kind of gymnastics:
horisontal stack view.png
horisontal stack view.png (24.75 KiB) Viewed 9316 times
But that's maybe not possible even with your magic? :(

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: how to rotate stack 90 degrees

Post by SparkOut » Sat Feb 07, 2015 5:56 pm

For the purposes of designing a hi-res layout on a 13" screen, I think you will have to edit the layout with the stack set to the correct dimensions of the target device and judiciously use scrolling, windows zoom settings and message box to "set the topleft of stack "myBigLayout" to 60,60" (and the local, the topright bottomleft, etc) to appropriate values to get the hi-res view into the screen area. I can't conceive a way to get a stack to rotate with the top of all objects still being the "top" but visually at the side.
Can you borrow a larger monitor?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10081
Joined: Fri Feb 19, 2010 10:17 am

Re: how to rotate stack 90 degrees

Post by richmond62 » Sat Feb 07, 2015 7:45 pm

The only way you could rotate buttons with text is rotate "buttons with text":

Set up each button with the text and the colours that you like, then do an IMPORT SNAPSHOT FROM BTN "XYZ" so you have pictorial buttons,
and you can rotate them as much as you like as they are images.

If you need sepearte button icons for buttonUp, buttonDown, armed and so on, you will need an image for each state: these can be rotated and then set
as icons for a standard button.

HOWEVER, field cannot be rotated the way you want them :(
btnFlip1.png
btnFlip2.png
btn_flip.livecode.zip
(9.41 KiB) Downloaded 232 times
You would also have to fake the bar at the top of the window. Hiding the real one is easy.

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: how to rotate stack 90 degrees

Post by SparkOut » Sat Feb 07, 2015 9:51 pm

Nice thoughts, but I understood the OP as wanting to rotate the stack due to trying to design the layout for a high-res tablet on a low-res (13 inch) monitor, so having the larger dimension (monitor width) as the larger dimension (portrait height) of the tablet. Importing snapshots and the ilk aren't any use. He's not trying to fake a landscape layout, he's trying to maximise the view of a hi-res (portrait) layout on a low-res screen while editing the stack. The final app is not going to be a sideways view on the target device.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: how to rotate stack 90 degrees

Post by FourthWorld » Sat Feb 07, 2015 11:42 pm

Given the range of different resolutions across iOS devices, and many times more on Android, I believe that designing for one resolution will ultimately be more trouble than it's worth.

Far better to design with resolution-independence in mind, which will allow development on desktop monitors which frequently have lower res than many mobile devices.

This will mean a bit of extra work up front to make sure the layout scales appropriately, but all of the OS design guidelines reinforce the value of doing so to allow deployment across the range of devices the OS covers.

And with LiveCode's pixelScale, fullscreen, and other language elements supporting resolution independence, it's about as easy as it can get, certainly easier than attempting the same things in Objective-C.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: how to rotate stack 90 degrees

Post by keram » Sun Feb 08, 2015 2:27 am

Hi everybody,

Thanks for your valuable input.
SparkOut wrote:he's trying to maximise the view of a hi-res (portrait) layout on a low-res screen while editing the stack. The final app is not going to be a sideways view on the target device.
This is an accurate description and I'll try to borrow a larger external monitor to do this work.
FourthWorld wrote:And with LiveCode's pixelScale, fullscreen, and other language elements supporting resolution independence
Yes, that's what I was planning to do, to use the set the fullscreenmode of me to "exactFit
Somewhere on the forum I read Jaqueline's advice to create largest possible stack suitable for a large tablet and then use fullscreenmode.

keram
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10081
Joined: Fri Feb 19, 2010 10:17 am

Re: how to rotate stack 90 degrees

Post by richmond62 » Sun Feb 08, 2015 4:53 pm

Some flat-screen monitors can do 'everything' for you, keram!

I have a second-hand flat monitor that is 21 inches (found it in a rubbish bin outside a supermarket!!!!!),
and it is attached to my main machine that runs Linux [Ubuntu Studio] which lets me play really silly games
with my monitor . . .
m1.png
standard:
m1fs.jpg
rotated:
m2fs.jpg
I often stand my monitor on its side and have this rotated view as it is very good when working
on translation work.

keram
Posts: 340
Joined: Fri Nov 08, 2013 4:22 am

Re: how to rotate stack 90 degrees

Post by keram » Sun Feb 08, 2015 5:08 pm

Thanks for a great tip! :)
Using the latest stable version of LC Community 6.7.x on Win 7 Home Premium, 64bit

Post Reply