Skip to main content
Participant
November 24, 2016
Answered

How to strikeout a block of text.

  • November 24, 2016
  • 5 replies
  • 1486 views

Hi, I am a total newbie to Adobe Java (I am a vb programmer) and I am trying to apply strikeout to a block of text.

My possible options are :-

1. Add a checkbox or radio button to the left of each block of text. When a box is ticked then all the other options need to have the strikeout applied to the associated text. As the text is not in a textbox I tried adding a line, made of underscores, to a rich textbox and tried to make the mouseup event on the checkbox make the rich textbox visible. I get an error on line 1. Invalid something.

2.Another idea was to duplicate the text in a rich textbox with strikeout true and making the textbox visible. Same problem.

I think I am missing something either in the setup or the terminology.

Any help would be greatly appreciated.

Another alternative is if I can be pointed to a beginners set of tutorials. I am not having any luck finding some.

Many thanks,

Gray

This topic has been closed for replies.
Correct answer try67

JS is case-sensitive. The name of the function you're trying to use is getField, not getfield ...

5 replies

JR Boulay
Community Expert
Community Expert
November 24, 2016

Hi.

Create a (empty, readonly, no fillcolor) text field with stroke properties settled to "underlined" and name it "strikeout".

Then use right-clic : Create multiple copy to get several fields with a consistent naming (.0, .1, .2, etc.).

Now you just have to show/hide all these "lines" with this JavaScript:

this.getField("strikeout").display = display.visible;

or

this.getField("strikeout").display = display.hidden;

Adobe Java

As a programmer you should know that Java is not Adobe and is not JavaScript.

.

Acrobate du PDF, InDesigner et Photoshopographe
Legend
November 24, 2016

I agree, terminology. As long as you look for information on Java you won't find anything useful.