How to minimize the main toolbar

PDF-XChange Editor SDK for Developers

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

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
coblejesse
User
Posts: 32
Joined: Thu May 16, 2019 7:44 pm

How to minimize the main toolbar

Post by coblejesse » Tue Jun 04, 2019 5:51 pm

Hi Alex,

How do you minimize the main toolbar like in the attached pictures?

2019-06-04 13_47_21-Window.png
2019-06-04 13_47_59-Window.png
(11.5 KiB) Not downloaded yet

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

Re: How to minimize the main toolbar

Post by Sasha - Tracker Dev Team » Wed Jun 05, 2019 7:26 am

Hello Jesse,

This method should help:
https://sdkhelp.tracker-software.com/vi ... r_Minimize

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

coblejesse
User
Posts: 32
Joined: Thu May 16, 2019 7:44 pm

Re: How to minimize the main toolbar

Post by coblejesse » Thu Jun 06, 2019 1:58 pm

I've tried the minimize method but it's making the whole CmdBar just disappear. Here is my code:

Code: Select all

public void ShowDocViewToolbar()
        {
            IsMainToolBarShowing = true;
            InitialHideMainMenus();
            PDFXEdit.IUIX_Cmd cmd;
            ShowCmdBar(IDS.cmdbar_file, false);
            ShowCmdBar(IDS.cmdbar_menubar, true);
            ShowCmdBar(IDS.cmdbar_standard, false);
            ShowCmdBar(IDS.cmdbar_properties, false);
            ShowCmdBar(IDS.cmdbar_commenting, false);
            ShowCmdBar(IDS.cmdbar_measurement, false);
            ShowCmdBar(IDS.cmdbar_view, false);
            ShowCmdBar(IDS.cmdbar_form, false);

            IsInfoToolBarHidden = true;

            cmd = GetIUIX_Cmd("cmd.view.lockUnlockAllCmdPanes");
            ExecuteIUIX_Cmd(cmd.ID);

            cmd = GetIUIX_Cmd("cmd.view.lockUnlockAllCmdBars");
            ExecuteIUIX_Cmd(cmd.ID);

            PDFXEdit.IUIX_CmdBar cmdBarQuickFind = PDFXEditor.Inst.ActiveMainView.CmdBar["cmdbar.quickFind"]; //Quick Find Bar
            cmdBarQuickFind.Hide();

            cmd = GetIUIX_Cmd("cmd.tool.editContent");
            cmd.Hidden = true;

            IsRightClickContextMenuEnabled = false;
            
            cmd = GetIUIX_Cmd("cmd.find");
            cmd.Hidden = true;


            PDFXEditor.Inst.LockCmdCustomizationEvent();
            uiInst.CmdManager.LockAllPanesUpdates();
            var rect = new tagRECT
            {
                top = 100,
                left = 100
            };

            rect.bottom = rect.top + 25;
            rect.right = rect.left + 100;

            var cusCmdBar = uiInst.CreateCmdBar(PDFXEditor.Inst.ActiveMainView.Obj, rect, "124", "CustomBar");

            var newbox = cusCmdBar.InsertNewBox("Custom");
            newbox.ItemsLowerSize = UIX_CmdItemSize.UIX_CmdItemSize_Small;
            newbox.ItemsIdealSize = UIX_CmdItemSize.UIX_CmdItemSize_Medium;

            cmd = GetIUIX_Cmd("cmd.saveAs");
            cmd.SetTitle(0, "Export Copy As...");
            newbox.InsertItem(cmd, 0);

            cmd = GetIUIX_Cmd("cmd.print");
            newbox.InsertItem(cmd);

            cmd = GetIUIX_Cmd("cmd.zoom.level.actual");
            newbox.InsertItem(cmd);

            cmd = GetIUIX_Cmd("cmd.zoom.level.fitWidth");
            newbox.InsertItem(cmd);

            cmd = GetIUIX_Cmd("cmd.zoom.level.fitPage");
            newbox.InsertItem(cmd);

            cmd = GetIUIX_Cmd("cmd.zoomIn");
            newbox.InsertItem(cmd);

            cmd = GetIUIX_Cmd("cmd.zoomOut");
            newbox.InsertItem(cmd);

            cmd = GetIUIX_Cmd("cmd.search");
            newbox.InsertItem(cmd);

            PDFXEdit.IUIX_CmdBar cmdBarContentEditing = PDFXEditor.Inst.ActiveMainView.CmdBar["cmdbar.contentEditing"]; //Content Editing Bar
            cmdBarContentEditing.Line.InsertBar(cusCmdBar, 0);
            cmdBarContentEditing.DeleteBoxes(0);

            cusCmdBar.Minimize();
            
            uiInst.CmdManager.UnlockAllPanesUpdates();
            PDFXEditor.Inst.UnlockCmdCustomizationEvent();
        }
2019-06-06 09_56_51-Window.png
(9.95 KiB) Not downloaded yet

coblejesse
User
Posts: 32
Joined: Thu May 16, 2019 7:44 pm

Re: How to minimize the main toolbar

Post by coblejesse » Thu Jun 06, 2019 2:09 pm

Also, this is what it looks like without the cusCmdBar.Minimize();
2019-06-06 10_07_43-Window.png
(11.23 KiB) Not downloaded yet

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

Re: How to minimize the main toolbar

Post by Sasha - Tracker Dev Team » Mon Jun 10, 2019 7:08 am

Hello Jesse,

Have you tried looking into the FullDemo application? There are many samples on how to work with the command bars - probably there is what you are looking for.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

coblejesse
User
Posts: 32
Joined: Thu May 16, 2019 7:44 pm

Re: How to minimize the main toolbar

Post by coblejesse » Mon Jun 10, 2019 8:08 pm

Alex,

I don't see what I'm looking for in the demo anywhere. I'm guessing the CmdBars are surrounded by something and that's what I need to close. Can you please point me in the right direction?

Thanks

User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 1946
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: How to minimize the main toolbar

Post by Vasyl-Tracker Dev Team » Tue Jun 11, 2019 9:05 pm

Hi Jesse.

Try this one:

Code: Select all

PDFXEdit.IUIX_CmdPane topCmdPane = pdfCtl.Frame.View.CmdPane[PDFXEdit.UIX_CmdPaneSides.UIX_CmdPaneSide_Top];
if (topCmdPane != null)
{
    if (!topCmdPane.IsMinimized)
        topCmdPane.Minimize();
    else
        topCmdPane.Expand();
}
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