Economy-x-Talk - Sample Scripts
CheckWidth()
This function returns the text width of a field. It uses a kind of default field to put the text into before calculating the width of that text.
on doTheCheck
get checkwidth(2, cd field 1)
return it
end doTheCheck
function checkwidth theField, theText
set the dontWrap of cd field theField to true
put theText into cd field theField
select before char 1 of cd field theField
put item 1 of the selectedLoc into leftEnd
select after the last char of cd field thefield
put item 1 of the selectedLoc into rightEnd
select empty
return rightEnd - leftEnd
end checkwidth
Keep this extensive resource of tutorials and samples on-line! Support RunRev.info!
| Yes, this script is useful. I make a donation and choose freely how much I want to donate on-line (PayPal). Click here if you want to make a donation in dollars. | This script has not (completely) solved my problem and I want Economy-x-Talk to take care of it. Let me contact you. |
Copyright©2002-2008 by Mark Schonewille, Nijmegen, the Netherlands. This web site is in no way affiliated with Runtime Revolution Ltd., but we do recommend the Revolution development platform.