Text Formatting

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
justintime
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8
Joined: Fri Jul 15, 2011 1:27 am

Text Formatting

Post by justintime » Mon Aug 15, 2011 8:55 pm

I am trying to get a text field to display a mix of plain and bold text while being entirely underlined. This should resemble a google search results page where each result is underlined and the search terms are bold. Right now my text fields are either or. I can select specific words to bold, but the underline disappears.

It would appear there is a bug that will not allow for bold underlined text.

Thanks in advance for any help.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Text Formatting

Post by bn » Mon Aug 15, 2011 9:16 pm

Hi justintime,

if you set the textstyle of a field to underline then all the text takes that property. If you then set the textstyle of a word to bold this word takes the property "bold" and overrides the textstyle of the field. You can however say

Code: Select all

 set the textstyle of word 4 of field 1 to bold, underline
this will set the textstyle of word 4 to bold and underline, in your particular case in line with the rest of the text.
I would not call it a bug, it is more flexible this way.

Kind regards

Bernd

justintime
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 8
Joined: Fri Jul 15, 2011 1:27 am

Re: Text Formatting

Post by justintime » Wed Aug 17, 2011 2:45 pm

Thanks so much!

Post Reply