Rotating a text field
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 365
- Joined: Mon Jun 10, 2013 1:32 pm
Rotating a text field
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
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
-
- Livecode Staff Member
- Posts: 192
- Joined: Thu Apr 18, 2013 2:48 pm
Re: Rotating a text field
The extensions course contains code for a rotated text widget here (click the downloads icon on the right)
-
- Livecode Opensource Backer
- Posts: 9287
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Rotating a text field
I dunno about anything else, livecodeali, but those links are worth a thousand words.
-
- VIP Livecode Opensource Backer
- Posts: 365
- Joined: Mon Jun 10, 2013 1:32 pm
Re: Rotating a text field
Hi Ali
Thanks for that - might take a little longer to learn but definitely worth the time.
Thanks again
Lagi
Thanks for that - might take a little longer to learn but definitely worth the time.
Thanks again
Lagi
-
- VIP Livecode Opensource Backer
- Posts: 2262
- Joined: Thu Feb 28, 2013 11:52 pm
- Location: Göttingen, DE
Re: Rotating a text field
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
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
shiftLock happens
-
- VIP Livecode Opensource Backer
- Posts: 365
- Joined: Mon Jun 10, 2013 1:32 pm
Re: Rotating a text field
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" .
But I will definitely look at that as well.
Best, Lagi
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" .
But I will definitely look at that as well.
Best, Lagi