August 10, 200718 yr 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? :(
August 12, 200718 yr 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
August 12, 200718 yr 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 August 12, 200718 yr by Guest
August 13, 200718 yr Author :( 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?
August 13, 200718 yr Author 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.
August 13, 200718 yr Well, you don't have to do it manually. Make a auto enter calc or custom function to colorize the words you define. Don
August 13, 200718 yr 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
August 13, 200718 yr ...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 )
August 13, 200718 yr "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.
August 15, 200718 yr Author :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!!
Create an account or sign in to comment