vertical text?

AndyP smudge.andy at googlemail.com
Wed Apr 12 07:14:13 EDT 2017


Try This:

Add a field named "Input"

Add this script to the field

on returnInField
      send "mouseUp" to button "Format"
end returnInField

Add a button named "Format"

Add this script to the button

local tWidth
local tHeight
local tChars
local tCount
local tTemp

on mouseUp
   
   put the formattedWidth of char 1 of fld "Input" into tWidth 
   put the formattedHeight of char 1 of fld "Input" into tHeight 
   put the number of chars of fld "Input" into tChars
   set the Width of fld "Input" to tWidth*2
   
   put fld "Input" into tTemp
   put empty into fld "Input"
   repeat with tCount = 1 to tChars
      put char tCount of tTemp into char 1 of line tCount of fld "Input"
   end repeat
   filter fld "Input" without empty
   set the height of fld "Input" to the formattedHeight of fld "Input"
   set the leftMargin of fld "Input" to 2
   set the rightMargin of fld "Input" to 2
   set the topMargin of fld "Input" to 4
   set the bottomMargin of fld "Input" to 4
   set the textAlign of fld "Input" to center
   set the textHeight of fld "Input" to the textSize
   
end mouseUp

Now enter text into the field, when you hit return the field is resized to
fit the now vertical text.




-----
Andy Piddock 


My software never has bugs. It just develops random features. 

TinyIDE a Free alternative minimalist IDE Plugin for LiveCode
TinyIDE 


Script editor Themer for LC http://2108.co.uk  

PointandSee is a FREE simple but full featured under cursor colour picker / finder.
http://www.pointandsee.co.uk  - made with LiveCode
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/vertical-text-tp4713887p4713904.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list