Page 1 of 1

Rotating a text field

Posted: Fri Apr 27, 2018 5:59 pm
by Lagi Pittas
Hi All,

I want to print some labels to a printer but the sizes I can get are "rotated" so as not to waste space.

Iv'e thought of a couple of ways to do this - in order of simplicity.

1. Take a snapshot of the text field after it has been "filled in" , rotate the snapshot how I wish on a card exactly the size of the label and print that card - job done.

2. Create a browser widget sized to the label and use the transform command in CSS with a javascript call to rotate it after I've populated the "canvas"

3. Create a PDF with sideways printed writing assuming I can rotate text using the new PDF addition.

I wouldn't know if 3 was possible without wasting a lot of time , 2 seems very possible , 1 is a doddle but wouldn't it be nice if there was something in that dictionary I have missed. -

BTW I'm Using V9 for this project so I can use all the goodies.

Regards Lagi

Re: Rotating a text field

Posted: Fri Apr 27, 2018 10:41 pm
by livecodeali
The extensions course contains code for a rotated text widget here (click the downloads icon on the right)

Re: Rotating a text field

Posted: Sat Apr 28, 2018 11:48 am
by richmond62
I dunno about anything else, livecodeali, but those links are worth a thousand words. :D

Re: Rotating a text field

Posted: Mon Apr 30, 2018 10:11 am
by Lagi Pittas
Hi Ali

Thanks for that - might take a little longer to learn but definitely worth the time.

Thanks again

Lagi

Re: Rotating a text field

Posted: Mon May 21, 2018 11:41 am
by [-hh]
Hi Lagi,

the only way to rotate a multiline text field is to use a browser widget, see hhTextEditBasic and hhTextEditFull in "Sample Stacks". You can with that even justify text and edit the text in rotated state.
See http://forums.livecode.com/viewtopic.ph ... 16#p161916

With LC Builder you can make a rotatedText widget for one line only. For multiline texts you have to do your own word break algorithm. I have done the latter in widget IconGrid (use a 1x1 grid), see
http://forums.livecode.com/viewtopic.ph ... 12#p158112
and (then apply to widget 'orientedText')
http://forums.livecode.com/viewtopic.ph ... 90#p148690

Re: Rotating a text field

Posted: Mon May 21, 2018 12:22 pm
by Lagi Pittas
Hi

Thank's Hermann. I haven't had chance to look into it since the post - it's a freebie for a relative so I have a couple more weeks to "fob him off" :D.

But I will definitely look at that as well.

Best, Lagi