Page 1 of 2

rotation, printing

Posted: Sun Sep 02, 2018 6:28 pm
by mikr2003
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

Re: rotation, printing

Posted: Sun Sep 02, 2018 6:58 pm
by Klaus
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

Re: rotation, printing

Posted: Sun Sep 02, 2018 7:02 pm
by ClipArtGuy
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.

Re: rotation, printing

Posted: Sun Sep 02, 2018 7:08 pm
by FourthWorld
If setting the print orientation would suffice, see:

https://livecode.com/resources/api/#liv ... rientation

Re: rotation, printing

Posted: Mon Sep 03, 2018 6:49 pm
by mikr2003
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

Re: rotation, printing

Posted: Mon Sep 03, 2018 6:58 pm
by Klaus
Hi Konstantin

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


Best

Klaus

Re: rotation, printing

Posted: Sat Sep 08, 2018 1:08 pm
by mikr2003
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.

Re: rotation, printing

Posted: Sat Sep 08, 2018 1:17 pm
by Klaus
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

Re: rotation, printing

Posted: Mon Sep 10, 2018 8:54 am
by mikr2003
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.

Re: rotation, printing

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

Code: Select all

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

Re: rotation, printing

Posted: Mon Sep 10, 2018 12:49 pm
by mikr2003
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.

Re: rotation, printing

Posted: Mon Sep 10, 2018 12:59 pm
by Klaus
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?

Re: rotation, printing

Posted: Mon Sep 10, 2018 1:23 pm
by bogs
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 :)

Re: rotation, printing

Posted: Mon Sep 10, 2018 1:27 pm
by Klaus
No comment!

Re: rotation, printing

Posted: Mon Sep 10, 2018 1:30 pm
by bogs
:mrgreen: :mrgreen: :mrgreen: