Laying out text
paul at livecode.org
Mon Feb 23 16:30:40 CET 2015
Nothing should cause LC to crash, so that should be reported as a bug, if you prefer not to or don't have enough time to report it just let me know and I would be happy to.
By default the templateField doesn't have the text properties set for textFont or textSize, however, I found that it can work if you set the font/size first, as far as I can see, you only need to set the font/size once provided you don't issue a reset command.
You could also use 'this card' or 'this stack', which doesn't crash LC if that helps.
put measureText("testText”,this card) into theTextWidth
> On Feb 23, 2015, at 3:16 AM, Terence Heaford <t.heaford at icloud.com> wrote:
> Tried it as:
> put measureText("testText”,templateField) into theTextWidth
> Wasn’t expecting it to work and it didn’t but should it have crashed LC?
> Would it be a good idea for it to work with the templateField?
> All the best
>> On 23 Feb 2015, at 07:35, Terence Heaford <t.heaford at icloud.com> wrote:
>> Can it work in some way with the templateField. In that way a field would not have to exist?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode