hide textbox on an annotation when hiding the annotation

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Rene
User
Posts: 39
Joined: Tue May 22, 2012 1:24 pm

hide textbox on an annotation when hiding the annotation

Post by Rene »

Hi,

When i made an annotation, i can double click it so a textbox shows up. In this textbox you can add some comment about the annotation. In our implementation users can hide all comments on the document due the following code:

Code: Select all

  string result = string.Empty;

            string script = " var myAnnotList = this.getAnnots(); " +                        
                            "   for (var i = 0; i < myAnnotList.length; i++)  { " +
                            "    myAnnotList[i].hidden = true;" +                          
                            " }";

            axCoPDFXCview1.RunJavaScript(script, out result, 0, 0);
The problem is that the textbox is still on the page. it is desirable that the textbox is also hide on the page. In the attachment you will find the before and after situation.

Rene.
You do not have the required permissions to view the files attached to this post.
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: hide textbox on an annotation when hiding the annotation

Post by Stefan - PDF-XChange »

Hi Rene,

Please try to add

Code: Select all

 myAnnotList[i].popupOpen = false;
to your code and this should solve the problem.

Cheers,
Stefan
Rene
User
Posts: 39
Joined: Tue May 22, 2012 1:24 pm

Re: hide textbox on an annotation when hiding the annotation

Post by Rene »

Tnx Stefan!

That did the trick!

René
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: hide textbox on an annotation when hiding the annotation

Post by Stefan - PDF-XChange »

:)