October 14, 20196 yr Is this at all possible? I want to have two buttons that will each do the following. Have one button to ‘Strike Thru’ text that is highlighted before. Means not all the text in the field will be changed. And one button to change the text colour to Red, again highlighted before. Means not all the text in the field will be changed. Any tips how to do this? Please bare in mind I am a FMP beginner. Thanks.
October 14, 20196 yr 7 hours ago, ChangeAgent said: Have one button to ‘Strike Thru’ text that is highlighted before. Assuming "highlighted" mean selected, make your button insert a calculated result = TextStyleAdd ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ; Strikethrough ) 7 hours ago, ChangeAgent said: one button to change the text colour to Red, Same thing - just use the TextColor() function instead. Do note that this may exhibit some quirky behavior when the text already has some styling at the insertion point. 7 hours ago, ChangeAgent said: Please bare in mind I prefer to remain clothed. Edited October 14, 20196 yr by comment
December 31, 20196 yr Perhaps add a "TextFormatRemove" (using comment's calculation as a script step) just before the TextStyleAdd step would clear up any quirky behavior. Of course, you'd have to be careful because that would remove ALL previous formatting from the text.
Create an account or sign in to comment