Page 1 of 1

Can't set textFont of char 1 of a button label?

Posted: Mon Jun 27, 2016 12:15 pm
by ctflatt
Hello, everyone!

I am trying to set the font of the first character of a button label to a different font than the rest of the label text. I keep throwing errors (can't set this property, error in object expression, etc.) when trying combinations to get this to work.

Here is what I am using:

Code: Select all

set the textFont of char 1 of label of button "myButton" to "myFont"
This throws an error in object expression.

Code: Select all

set the textFont of button "myButton" to "myFont"
This throws an error in setting this property.

Is it possible to set the first character of a button label to a different font than the rest of the label text?

If so, could someone please point me in the right direction?

I would greatly appreciate it!

Re: Can't set textFont of char 1 of a button label?

Posted: Mon Jun 27, 2016 12:47 pm
by Klaus
Hi cflatt,
set the textFont of button "myButton" to "Arial"
is working for me without problems or errors! LC 8.01 on a Mac.

I am afraid you can only set the textfont for CHUNKS in FIELDS
but not for the label of a button.

Just tried to cheat with HTML text etc. no way, sorry.


Best

Klaus

Re: Can't set textFont of char 1 of a button label?

Posted: Mon Jun 27, 2016 1:21 pm
by ctflatt
Klaus,

Thanks for the confirmation.

I have gotten much better in my scripting these past few years, and thought I was just losing my mind.

I appreciate it.

Hope you've been well :)

Todd

By the way, I am using 8.1.0 (dp 1)

Re: Can't set textFont of char 1 of a button label?

Posted: Mon Jun 27, 2016 2:48 pm
by dunbarx
Hi.

You would have to kluge the label. Maybe overlay a field onto a button with its "showName" property set to "false" ?

Craig Newman

Re: Can't set textFont of char 1 of a button label?

Posted: Fri Jul 08, 2016 4:02 pm
by MaxV
Create a label, create an image or graph, group it.
To have your custom super button, see also:
http://translate.google.com/translate?j ... li_88.html