5 Replies Latest reply on Nov 27, 2016 4:46 PM by grayn31999337

    How to strikeout a block of text.

    grayn31999337

      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

        • 1. Re: How to strikeout a block of text.
          JR_Boulay Adobe Community Professional

          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.

           

           

          .

          1 person found this helpful
          • 2. Re: How to strikeout a block of text.
            Test Screen Name Most Valuable Participant

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

            • 3. Re: How to strikeout a block of text.
              grayn31999337 Level 1

              Hi,

              Thanks for the reply. That is almost identical to what I was using (I was using an string of Underscore instead of the Stroke Property Underlined - which I cannot find) but I still get the following error.

               

              Javascript code in Check Box2 MouseUp event

               

                        this.getfield("strikeout").display=display.hidden

               

              Error received

               

                        Exception in line 1 of function top_level, script Field:Mouse Up

               

              To me it sounds like there is some setting I have not set.

               

              Thanks for your help.

               

              • 4. Re: How to strikeout a block of text.
                try67 MVP & Adobe Community Professional

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

                2 people found this helpful
                • 5. Re: How to strikeout a block of text.
                  grayn31999337 Level 1

                  Thanks try67. Although JR_Boulay did give the correct answer I already have tried that code. Being a VB programmer I was not aware that commands were case sensitive.

                  So thank you to both of you.

                  In future I will paste my code for scrutiny.