How to stop new field entries from getting auto bolded

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Ed_Ray
Posts: 83
Joined: Sun Jun 19, 2016 12:18 am

How to stop new field entries from getting auto bolded

Post by Ed_Ray » Sat Oct 22, 2016 11:57 am

Does anyone know which field setting stops livecode from automatically "bolding" every new text entry into a field.
I checked all of the field properties including the "text" option which was NOT set to bold.

I had taken care of this before by specifying:
"set the textStyle of word 1 to -1 of field "FieldInUse" to plain" after entering my initial text into a field.

The problem is after I do this initial text entry, I add some styling to the text (some words get italic or bold, some words are colored etc). Some time later I copy the styled text version from my original field to a temp field for LATER retrieval into the original field by means of:
set the htmlText of field "TempField" to the htmlText of field "FieldInUse".

The problem is although all the styling gets copied correctly into the temp field, livecode once again bolds every single word entered into a field. This negates my work because I only want only certain text to be colored and bolded to accent the important text (only the words I took the tedious time of previously styling) with ALL non styled text KEPT plain meaning UNBOLDED.

Why would any livecode developer think bolding EVERY field entry a good default for fields?

Thanks in advance for those that answer.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: How to stop new field entries from getting auto bolded

Post by dunbarx » Sat Oct 22, 2016 3:12 pm

Hi.

What you are describing is surreal. I have never come across anything like you describe. We do not want haunted software.

What version of LC? What platform?

Are you sure that no handler is changing your textStyle?

Craig Newman

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: How to stop new field entries from getting auto bolded

Post by jacque » Sat Oct 22, 2016 4:29 pm

Text styles in a field use inheritance. If a character in the text itself doesn't have a style assigned it inherits the default text style of the field. It sounds like your temp field is set to be bold by default. Check the text properties of the field.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: How to stop new field entries from getting auto bolded

Post by dunbarx » Sat Oct 22, 2016 6:20 pm

@Jacque.

Could be, but the OP said he checked the text styles of the field. Hmmm.

@ Ed.

By the way, is this the only field on the card that does this? What does a brand new field do?

And do you see what Jacque meant? If you make a new field in a new stack (just to be sure that nothing is preset) and ask for what seem to be existing properties, like the "textSize", you will get empty. You can type into that field, so how could the textSize be empty?

Craig

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: How to stop new field entries from getting auto bolded

Post by jacque » Sat Oct 22, 2016 8:08 pm

Text inherits from its field, which inherits from the card (I think) which gets it from the stack, which gets it from the home stack which gets it from the system. If the textsize is empty, it's inherited. If you ask for "the effective textsize" you'll get the inherited size.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: How to stop new field entries from getting auto bolded

Post by dunbarx » Sun Oct 23, 2016 4:57 am

Jacque.

I know that. This is not my first rodeo. 8)

I was speaking to the OP.

Craig :wink:

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: How to stop new field entries from getting auto bolded

Post by jacque » Sun Oct 23, 2016 5:12 am

Sorry Craig, I should have put @Ed on my post too.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10330
Joined: Wed May 06, 2009 2:28 pm

Re: How to stop new field entries from getting auto bolded

Post by dunbarx » Mon Oct 24, 2016 3:46 am

Jacque.

:D

Always.

Craig

Ed_Ray
Posts: 83
Joined: Sun Jun 19, 2016 12:18 am

Re: How to stop new field entries from getting auto bolded

Post by Ed_Ray » Tue Oct 25, 2016 1:16 am

Hi Craig and other fellow respondents.

I am using livecode ver 8.1. I am using the desktop platform on OS of windows 7 SP1.
And yes I am sure none of my handler's is doing this.

After going through all the fonts one by one I think the issue is that for some strange reason livecode has decided to make the great majority of the fonts dark to very dark to the point that many of them are almost as dark or as dark as a bold text style.

When comparing similar or same fonts in other apps like word for windows, pdf files etc you can really see the marked difference when a font is "bolded" or not but unfortunately this does not apply to livecode where the difference is very hard to see in most cases.

This is problematic because if like in my case, you want make certain line to stand out with color or italics or bold it does NOT help when the surrounding words look almost as dark as the bold ones...its actually quite annoying.

To clarify for some of the other respondents, I did made sure that the default for the fields were not bold and although true that the settings are originally inherited from the stack level, once you pick a different setting at the control level the original inherited setting is overridden by the control level changed setting. This I verified.

While going through all this to respond back to all of your helpful comments, I did notice that if I selected the "(default)" setting for the field font and text was entered into the field, the font was different than if I set it afterwards with a script line such as "set textfont of word 1 to -1 of field id 1003 to "default".

Any reason why this happens?...strange indeed.

Thanks.

Post Reply