Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Highlighting a piece of text


This topic is 6311 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a block of text on a layout. I want to highlight just a few words within that block of text but it seems FileMaker will only let me highlight the entire block of text. What am I doing wrong? :(

Posted

You'll need to chop apart and re-assemble the text in question:

SetField(YourFieldRef; "leave this text plain " &

TextColor ( "make this text color " ; RGB ( 100 ; 20 ; 200 ) ) & "more plain text"

Don

Posted (edited)

To answer your question, I think we need a little more information as to what you are trying to do.

More than likely, there is a way to do what you want, but a lot will depend on your response.

Is there anything special about the text that requires the highlighting? I.e., are you looking for specific words (like "Yes", "No", "Maybe", "True", etc., phrases (such as "a Meeting was held"), or a email address, etc.)

Lee

Edited by Guest
Posted

:( This is what I [color:gray]mean. I need to [color:gray]shade certain words in the [color:gray]text. I have one big block of text and FM does not seem to let me [color:gray]shade only certain words. When I try to shad it shades the entire block of text.

As 'dreamingmind' suggests I might have to split the text so that the words I want to shade are in a text block by themselves. I was hoping I would not have to do that. I can italacize words in a text block, but FM won't let me shade individual words?

Posted

and... if you don't want to predefine the words, you could build your calculation or function so it looks for words you type with a delimiter and colorizes those words for you.

This is my field content *and I want this in color* but not this.

Then the calc looks for the * char and builds the proper TextColor command into the text at that point .

Don

Posted

...or you can use a script like this:

Set Variable [ $text to highlitht; Value: Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ]

Set Field [ Substitute ( TextColorRemove ( Get ( ActiveFieldContents ) ) ; $text to highlitht ; TextColor ( $text to highlight ; RGB ( 255 ; 0 ; 0 ) ) ) ]

You have to fire the script after you had made a selection of the text. ( and every occurrences of the selection in your text will become red )

Posted

"The shade didn't come out too well here. I am trying to use the FILL attribute so I cn shade certain words in grey so they stand out."

You can only change the colour of the text, not apply a background shade or fill to it.

Posted

:thumbup: Thanks everybody. I have to be honest. I read all your responses and since I'm pretty much a beginner I had trouble understanding a lot of it. But I have gotten my shading!!! This is how I did it. It works for text which is static - i.e it does not change its position on the layout - which is the case for me. The solution I am using:

create a borderless box over the text I want to highlight. Do this by using the rectangular icon in the status area. When you do this initially your text will not be displayable - because the box is on top of the text. Then shade the box whatever color you want to shade it using the paint icon in the status area. When you are done doing this then choose the ARRANGE > Send Backward option. This will move the shading to the background and your text will now reappear!! Works like a charm but remember - if your text moves around this won't work because the shaded box is static and won't move. Thanks all for your help!!

This topic is 6311 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.