Setting the default state of Panes to visible but Closed

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

JGForwick
User
Posts: 16
Joined: Fri Jan 21, 2011 7:17 pm

Setting the default state of Panes to visible but Closed

Post by JGForwick »

Hi there, question regarding making the various panes (thumbnails, bookmarks etc) visible....

When the panes are made visible via code

SetProperty("Documents[#" + iActiveDocID.ToString() + "].View.Panes[\"Thumbnails\"].Visible", vDataIn)

is there a way to set the default state of those panes to collapsed instead of expanded? I.e. so that the Panes splitter is flush to the left edge of the viewer (the panel(s) are closed) as if the user clicked the splitter handle/arrow?

Thanks in advance
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Setting the default state of Panes to visible but Closed

Post by Vasyl - PDF-XChange »

Hi, JGForwick.

I'm afraid but no other way for hiding/showing doc panes currently. Please wait for next version (V3) for more UI-control...
Also you may intercept the notify about changing of one global property to detect "Document Just Opened" case:

Code: Select all

eventhandler OnEvent(type, name, ...)
{
      if ((type == PXCVA_OnPropertyChanged) AND (name == "Documents.Active")) // document just activated
      {
           int activeDocId;
           ctrl.GetProperty(name, out activeDocId, 0);
           if (<activeDocId_countains_unknown_document_id_for_us>) // the same: document just opened
           {
               // change panes visibility for just opened document...
           }
      }
}
HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.