Force comments pane to dock at bottom

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

Force comments pane to dock at bottom

Post by lidds »

I am opening the comments docking pane using the below command. I was wondering if there is a way to tell it to dock at the bottom?

Code: Select all

Me.docPreview.ShowPane("commentsView", True)
Thanks

Simon
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Force comments pane to dock at bottom

Post by Sasha - Tracker Dev Team »

Hello Simon,

I will have to ask a developer who is responsible for this feature, whether this is possible to do via the SDK. Once he replies i will write back.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Force comments pane to dock at bottom

Post by Vasyl-Tracker Dev Team »

Hi Simon.

Sorry for delay with answer. The working code for your case:

Code: Select all

PDFXEdit.IPXV_Document doc = pdfCtl.Doc;

PDFXEdit.IUIX_Obj pane = doc.ActiveView.CommentsView.Obj;
PDFXEdit.IUIX_Layout layout = doc.ActiveView.Panes.Layout;
PDFXEdit.IUIX_LayoutItem root = layout.Root;

// layout's root element by default contains list of sub-elements with vertical splitters between each one
// firstly we must 'encapsulate' all existing root's children to separate sub-container with the same style with vertical splitters
layout.WrapAllChildrenByNewSubContainer(root, root.Style); 
// currently is safe to change root's style to get horizontal splitters
root.Style = root.Style & (int)~PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_VertSplitters;

// find corresponding layout item for pane and keep some attributes of it
PDFXEdit.IUIX_LayoutItem oldLI = layout.GetItem(pane);
string title = oldLI.Title;
string tooltip = oldLI.Tooltip;
int style = oldLI.Style;

// remove pane from layout
oldLI.Remove();

PDFXEdit.tagSIZE sz;
sz.cx = sz.cy = 200;

// add pane bottom
PDFXEdit.IUIX_LayoutItem newLI = layout.Insert(pane, title, root, ref sz, style);
HTH
Vasyl Yaremyn
Tracker Software Products
Project Developer

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