Dear All,
I want to hide or remove some buttons in the Editor SDK's Thumbnails pane,because I do not want the end users to use them.
I have upload a image to indicate that which buttons need to be shown and which buttons need to be hidden or removed.
Please give me some advise or sample.
Thanks in advance.
hide some buttons in Thumbnails pane SOLVED
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.
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.
hide some buttons in Thumbnails pane
- Attachments
-
- 1.rar
- (731.43 KiB) Downloaded 97 times
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: hide some buttons in Thumbnails pane SOLVED
Hello kyo,
Here's the sample that I have that removes Delete command from the Thumbnails View:
Cheers,
Alex
Here's the sample that I have that removes Delete command from the Thumbnails View:
Code: Select all
PDFXEdit.IUIX_ScrollContainer scrollContainer = GetParentScrollContainer(pdfCtl.Doc.ActiveView.PageThumbsView.Obj);
PDFXEdit.IUIX_CmdLine line = scrollContainer.CmdPaneTop[0];
PDFXEdit.IUIX_CmdBar bar = line[0];
PDFXEdit.IUIX_CmdItem item = bar.FindFirstItemByCmdName("cmd.delete");
item.Delete();
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: hide some buttons in Thumbnails pane
Hello,
Oh,I am very sorry.I made a mistake that I want to hide buttons in Bookmarks pane not the Thumbnails pane.
Does your sample code can be applied to Bookmarks pane either?
You'd better download the attachment that you can understand my requirement easily.
Thanks.
Oh,I am very sorry.I made a mistake that I want to hide buttons in Bookmarks pane not the Thumbnails pane.
Does your sample code can be applied to Bookmarks pane either?
You'd better download the attachment that you can understand my requirement easily.
Thanks.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: hide some buttons in Thumbnails pane
Hello kyo,
Yes, this code can be applied to any pane.
Cheers,
Alex
Yes, this code can be applied to any pane.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: hide some buttons in Thumbnails pane
Code: Select all
PDFXEdit.IUIX_ScrollContainer scrollContainer = GetParentScrollContainer(pdfCtl.Doc.ActiveView.PageThumbsView.Obj);
PDFXEdit.IUIX_CmdLine line = scrollContainer.CmdPaneTop[0];
PDFXEdit.IUIX_CmdBar bar = line[0];
PDFXEdit.IUIX_CmdItem item = bar.FindFirstItemByCmdName("cmd.delete");
item.Delete();
How to implement the GetParentScrollContainer method? Please give me a sample.
Thanks in advance.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: hide some buttons in Thumbnails pane
Hello kyo,
Forgot to include that one. Here you go:
Cheers,
Alex
Forgot to include that one. Here you go:
Code: Select all
PDFXEdit.IUIX_ScrollContainer GetParentScrollContainer(PDFXEdit.IUIX_Obj obj)
{
if (obj.Parent != null)
{
IntPtr outPtr;
obj.Parent.QueryImpl(typeof(PDFXEdit.IUIX_ScrollContainer).GUID, null, out outPtr);
PDFXEdit.IUIX_ScrollContainer sc = (PDFXEdit.IUIX_ScrollContainer)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr);
if (sc != null)
return sc;
return GetParentScrollContainer(obj.Parent);
}
return null;
}
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ