Problems creating a field in LC8 DP16

William Prothero prothero at earthednet.org
Thu Mar 17 22:33:57 EDT 2016


I got it working better by increasing the settings of the margins and setting the textHeight to 0.

Bill

> On Mar 17, 2016, at 6:58 PM, William Prothero <prothero at earthednet.org> wrote:
> 
> 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
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list