rotation, printing

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

mikr2003
Posts: 6
Joined: Sun Sep 02, 2018 6:21 pm

rotation, printing

Post by mikr2003 » Sun Sep 02, 2018 6:28 pm

Hello,

I’m new here and I’m working on a small project.
I have a couple of questions and hope that you could help me.

1) How can I rotate fields, buttons to be able to write a text from up to down.
2) I have a stack. Its width is 1622 and height is 588. How could I resize the stack to A4 with saving positions of my objects? My goal is to print it out in this size.

Thanks so much in advance for your help.
Konstantin

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: rotation, printing

Post by Klaus » Sun Sep 02, 2018 6:58 pm

Hi Konstantin,

welcome to the forum!
1) How can I rotate fields, buttons to be able to write a text from up to down.
fields and buttons cannot be rotated, however there is a widget, which will let you rotate text, check this page:
http://forums.livecode.com/viewtopic.ph ... xt#p167477
2) I have a stack. Its width is 1622 and height is 588. How could I resize the stack to A4 with saving positions of my objects? My goal is to print it out in this size.
You can "force" to print the big stack into a certain (smaller) rect:

Code: Select all

...
## DIN A4
print this stack into 0,0,595,842
...
Best

Klaus

ClipArtGuy
Posts: 253
Joined: Wed Aug 19, 2015 4:29 pm

Re: rotation, printing

Post by ClipArtGuy » Sun Sep 02, 2018 7:02 pm

Fields and buttons can not be rotated, but another option is to "export snapshot" your fields and buttons and rotate those by setting the "angle" property.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9824
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: rotation, printing

Post by FourthWorld » Sun Sep 02, 2018 7:08 pm

If setting the print orientation would suffice, see:

https://livecode.com/resources/api/#liv ... rientation
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

mikr2003
Posts: 6
Joined: Sun Sep 02, 2018 6:21 pm

Re: rotation, printing

Post by mikr2003 » Mon Sep 03, 2018 6:49 pm

Klaus wrote:
Sun Sep 02, 2018 6:58 pm

You can "force" to print the big stack into a certain (smaller) rect:

Code: Select all

...
## DIN A4
print this stack into 0,0,595,842
...

Where do I have to put it in? in the Message Box?

Thanks

Konstantin

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: rotation, printing

Post by Klaus » Mon Sep 03, 2018 6:58 pm

Hi Konstantin

well, wherever you want to print your stack, be it in the message box or in a button script...


Best

Klaus

mikr2003
Posts: 6
Joined: Sun Sep 02, 2018 6:21 pm

Re: rotation, printing

Post by mikr2003 » Sat Sep 08, 2018 1:08 pm

Klaus wrote:
Sun Sep 02, 2018 6:58 pm

You can "force" to print the big stack into a certain (smaller) rect:

Code: Select all

...
## DIN A4
print this stack into 0,0,595,842
...

I’m sorry! I put it in the message box, pressed Enter, closed the message box, chose Print Card, but without result.

What did I do wrong?

Thanks.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: rotation, printing

Post by Klaus » Sat Sep 08, 2018 1:17 pm

Hi Konstantin,

of course I meant that you need to put it into the script of your button (?) which does the printing.

If issued in the message box, which is also a stack, maybe the message box gets printed.
-> THIS STACK refers to the stack the command has been issued in, in this case the message box stack!

If you want to use the message box, type:

Code: Select all

print stack "your stack to be printed here!" into 0,0,595,842
Best

Klaus

mikr2003
Posts: 6
Joined: Sun Sep 02, 2018 6:21 pm

Re: rotation, printing

Post by mikr2003 » Mon Sep 10, 2018 8:54 am

Klaus wrote:
Sat Sep 08, 2018 1:17 pm

If you want to use the message box, type:

Code: Select all

print stack "your stack to be printed here!" into 0,0,595,842
Message execution error:
Error description: Chunk: can't find stack
Hint:

Why? :(

Thanks.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: rotation, printing

Post by Klaus » Mon Sep 10, 2018 10:35 am

Did you really enter exactly this:

Code: Select all

print stack "your stack to be printed here!" into 0,0,595,842
?

mikr2003
Posts: 6
Joined: Sun Sep 02, 2018 6:21 pm

Re: rotation, printing

Post by mikr2003 » Mon Sep 10, 2018 12:49 pm

Klaus wrote:
Mon Sep 10, 2018 10:35 am
Did you really enter exactly this:

Code: Select all

print stack "your stack to be printed here!" into 0,0,595,842
?
Yes, I did.

Thanks.
Attachments
2018-09-10_13h44_29.png

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: rotation, printing

Post by Klaus » Mon Sep 10, 2018 12:59 pm

Ouch, do you really have a stack named "your stack to be printed here!" that you want to print? :shock:

Or maybe you just want to replace "your stack to be printed here!" with the name of your stack?

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: rotation, printing

Post by bogs » Mon Sep 10, 2018 1:23 pm

Klaus wrote:
Sat Sep 08, 2018 1:17 pm
If you want to use the message box, type:

Code: Select all

print stack "your stack to be printed here!" into 0,0,595,842
Klaus wrote:
Mon Sep 10, 2018 10:35 am
Did you really enter exactly this:

Code: Select all

print stack "your stack to be printed here!" into 0,0,595,842
?
Klaus wrote:
Mon Sep 10, 2018 12:59 pm
... replace "your stack to be printed here!" with the name of your stack ...
Heh, you probably should have said to replace that a couple posts up Klaus :wink:

@ mikr2003, Just for future reference, not all code posted on the boards should be taken literally, although it can be confusing.

If you see a line with "your [object name] here", that is telling you to replace what is within the quotes with the actual name you chose for that object :)
Last edited by bogs on Mon Sep 10, 2018 1:31 pm, edited 2 times in total.
Image

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: rotation, printing

Post by Klaus » Mon Sep 10, 2018 1:27 pm

No comment!

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: rotation, printing

Post by bogs » Mon Sep 10, 2018 1:30 pm

:mrgreen: :mrgreen: :mrgreen:
Image

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”