Problems creating a field in LC8 DP16

William Prothero prothero at earthednet.org
Thu Mar 17 21:58:03 EDT 2016


Folks:
My plot routines use fields as labels. Fields are created on the fly, the plot image is captured, and the fields are deleted. In LC8 DP16, I find that the field heights are messed up. I create the field and put text in it using the following function:

I know that fields work differently in version 8, but I thought the formattedHeight and formattedWidth should adjust the rect to make all of the text visible. This works fine in version 7
function iml_makeField tName,tText

	if there is no cd fld tName then

		create field tName

	end if

	put tText into fld tName

	set the visible of fld tName to FALSE

	set the showBorder of fld tName to FALSE

	set the style of fld tName to "transparent"

	set the textAlign of fld tName to "center"

	set the textfont of fld tName to "Arial"

	set the textSize of fld tName to 12

	set the borderWidth of fld tName to 0

	set the margins of fld tName to 2,3,0,0

	set the dontWrap of fld tName to true

	set the textHeight of fld tName to 20

	--wait for 0 seconds with messages

	set the fontStyle of fld tName to bold

	set the rect of fld tName to "0,0,"&(the formattedWidth of fld tName)&","&(the formattedHeight of fld tName)

	return the rect of fld tName

end iml_makeField


Any ideas?
Bill




More information about the use-livecode mailing list