Change Command on "Add new Tab"-Button 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.
Change Command on "Add new Tab"-Button
Hello,
i want to change the command on the "Add new Tab"-Button.
Is that possible?
sbe
i want to change the command on the "Add new Tab"-Button.
Is that possible?
sbe
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change Command on "Add new Tab"-Button
Hello sbe,
Well, depending on what do you want. For example, there was a sample on how to hide it - maybe this would suit your needs.
Cheers,
Alex
Well, depending on what do you want. For example, there was a sample on how to hide it - maybe this would suit your needs.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Change Command on "Add new Tab"-Button
Hello Alex!
I've already searched for the "Add New Tab" command in the command list and have not found it.
sbe
I've already searched for the "Add New Tab" command in the command list and have not found it.
sbe
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change Command on "Add new Tab"-Button
Because there is no such command. Referring to my previous post, there is a possibility of hiding the button itself. Do you have a need to reload it?
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Change Command on "Add new Tab"-Button
Ok, so how can I hide the button?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change Command on "Add new Tab"-Button SOLVED
This piece of code will do this:
Note, that this will be only available when at least one document is already opened. Best to use this piece of code in the e_document_viewingStarted event.
Cheers,
Alex
Code: Select all
PDFXEdit.IUIX_Layout layout = pdfCtl.Inst.MainFrm[0].View.DocViewsArea.Panes.Layout;
if (layout.Root.Count > 0)
layout.Root[0].SetStyle(0, (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_AddNewTabBtn);
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Change Command on "Add new Tab"-Button
Thank you.
That is perfect
sbe
That is perfect
sbe
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change Command on "Add new Tab"-Button
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Change Command on "Add new Tab"-Button
Hi Alex,
Is this still the case? No command for the "Add new tab" "+" sign?
Again, here also I have the problem with multiple PXV_Control instances. If a document docA is open in crlA, clicking the "+" in ctrlB and trying to open docA will just activate ctrlA. Like with the "cmd.open" - any handler to custom handle?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change Command on "Add new Tab"-Button
Hello zarkogajic,
In your case, it's better to disable it, as that is not a command and you cannot handle the execution.
Cheers,
Alex
In your case, it's better to disable it, as that is not a command and you cannot handle the execution.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Change Command on "Add new Tab"-Button
Alex,
Just to be certain of what you are saying: there's nothing a developer can do when that "+" button is clicked? From the click action to the final result - all is completely under psv_control and no event or something can be used to change anything here?
-ž
Just to be certain of what you are saying: there's nothing a developer can do when that "+" button is clicked? From the click action to the final result - all is completely under psv_control and no event or something can be used to change anything here?
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change Command on "Add new Tab"-Button
Hello zarkogajic,
You can always add the DocumentViewsArea's object as a custom event target:
Then listen to the OnEvent's
And you can show your own dialog here to open files, and use the pEvent.Handled = true; to break with your results
Cheers,
Alex
You can always add the DocumentViewsArea's object as a custom event target:
Code: Select all
IPXV_MainFrame mainFrm = pdfCtl.Inst.MainFrm[0] as IPXV_MainFrame;
IPXV_MainView view = mainFrm.View as IPXV_MainView;
IPXV_DocumentViewsArea docViewsArea = view.DocViewsArea as IPXV_DocumentViewsArea;
dvaET = new CustomEventTarget(docViewsArea.Obj, this);
Code: Select all
if (pEvent.Code == (int)PDFXEdit.UIX_EventCodes.e_Notify)
{
IntPtr outPtr = new IntPtr(pEvent.Param1);
PDFXEdit.UIX_NotifyInfo ni = (PDFXEdit.UIX_NotifyInfo)System.Runtime.InteropServices.Marshal.PtrToStructure(outPtr, typeof(PDFXEdit.UIX_NotifyInfo));
if (ni.nCode == (int)PDFXEdit.UIX_NotifyCodes.UIX_Notify_Layout_AddNewTabs)
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1370
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Change Command on "Add new Tab"-Button
Alex,
Yes, that's it thanks.
-ž
Yes, that's it thanks.
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Change Command on "Add new Tab"-Button
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ