Problems creating a field in LC8 DP16

Earthednet-wp prothero at earthednet.org
Fri Mar 18 01:39:32 EDT 2016


So, I guess we can't count on the formattedHeight and formattedWidth to return dimensions of a rect that will show all of the text in a field? I would like to keep the rect of the field as small as possible. I also use it to make a 90 degree rotated label. 

If this is a manifestation of a bug, I will probably just increase the space around the text.

Best,
Bill

William Prothero
http://es.earthednet.org

> On Mar 17, 2016, at 9:17 PM, -hh <hh at livecode.org> wrote:
> 
> I deleted the four lines (*) of your function (see citation below)
> and inserted instead the following 4 lines, in that order, at end of it.
> 
>  set fixedLineHeight of fld tName to true
>  set textSize of fld tName to 12
>  set textHeight of fld tName to 20
>  return (0,0,the formattedWidth of fld tName, \
>             the formattedHeight of fld tName)
> 
> because
> 1. the default setting of fixedLineHeight may have changed?
> 2. why use possible update bugs of "rect" if not needed?
> 
> Works fine here.
> 
>> William P. wrote:
>> ==
> 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
>> ==
> 
> 
> 
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/Problems-creating-a-field-in-LC8-DP16-tp4702326p4702329.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> 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