Multi tab: hide/disable "drag and drop all tabs" 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.
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Multi tab: hide/disable "drag and drop all tabs"
Hi devs,
Using muti tab viewer (Docs.SingleWnd = false).
How would I programmatically hide/disable "Drag and Drop all tabs" "tab" ?
Using muti tab viewer (Docs.SingleWnd = false).
How would I programmatically hide/disable "Drag and Drop all tabs" "tab" ?
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Multi tab: hide/disable "drag and drop all tabs"
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Multi tab: hide/disable "drag and drop all tabs"
Ah ...
So, hiding the "drag and drop all tabs" by handling the "e_document_viewingStarted" and setting the UIX_LayoutItemStyle_NoTabBarGripperBtn - kind of works.
The e_document_viewingStarted seems to get fired only when a new document is loaded.
Now, having multiple tabs/documents open:
Sort the tabs:
and the TabBarGripperBtn gets visible again.
Question: what else to handle (and when) to set the UIX_LayoutItemStyle_NoTabBarGripperBtn ?
I want to remove that gripper button for good!
So, hiding the "drag and drop all tabs" by handling the "e_document_viewingStarted" and setting the UIX_LayoutItemStyle_NoTabBarGripperBtn - kind of works.
The e_document_viewingStarted seems to get fired only when a new document is loaded.
Now, having multiple tabs/documents open:
Sort the tabs:
and the TabBarGripperBtn gets visible again.
Question: what else to handle (and when) to set the UIX_LayoutItemStyle_NoTabBarGripperBtn ?
I want to remove that gripper button for good!
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Multi tab: hide/disable "drag and drop all tabs"
Hello zarkogajic,
The best way to ensure this would be to use the Custom Event Handler for the Document Views Area and listen to the:
From what I see, this will be fired all of the times that layout is being changed (even if you switch between the documents).
Cheers,
Alex
The best way to ensure this would be to use the Custom Event Handler for the Document Views Area and listen to the:
Code: Select all
if (ni.nCode == (int)PDFXEdit.UIX_NotifyCodes.UIX_Notify_Layout_Changed)
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Multi tab: hide/disable "drag and drop all tabs"
Hi Alex,
Thanks. This seems to do the trick.
Sadly, not 100%.
I can still reorder tabs by drag and drop - I'm ok with this and yes, I do not want to disable this by using UIX_LayoutStyle_PanesNoReorder.
But, I simply must disable drag-dropping a tab to move out of the main frame and open/goto/display another view (frame, window, however this is called) of the editor.
How to not allow the above?
Thanks. This seems to do the trick.
Sadly, not 100%.
I can still reorder tabs by drag and drop - I'm ok with this and yes, I do not want to disable this by using UIX_LayoutStyle_PanesNoReorder.
But, I simply must disable drag-dropping a tab to move out of the main frame and open/goto/display another view (frame, window, however this is called) of the editor.
How to not allow the above?
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Multi tab: hide/disable "drag and drop all tabs"
Hello zarkogajic,
I've forwarded this to the appropriate developer, waiting for the reply.
Cheers,
Alex
I've forwarded this to the appropriate developer, waiting for the reply.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Multi tab: hide/disable "drag and drop all tabs"
Hi Alex,
Any news here?
-ž
Any news here?
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Multi tab: hide/disable "drag and drop all tabs"
Hello zarkogajic,
Reminded him about this one - waiting for the reply.
Cheers,
Alex
Reminded him about this one - waiting for the reply.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Multi tab: hide/disable "drag and drop all tabs"
Hi zarkogajic.
Sorry for delay with answer.
To hide the unnecessary buttons use it once:
To prevent undocking the document tabs but keep ability to reorder them:
HTH.
Sorry for delay with answer.
To hide the unnecessary buttons use it once:
Code: Select all
PDFXEdit.IUIX_LayoutItem tabsContainer = pdfCtl.Frame.View.DocViewsArea.Panes.Layout.Root[0];
int st = (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoTabBarGripperBtn;
int stm = (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoTabBarGripperBtn | (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_ShowSortedTabsBtn;
tabsContainer.SetStyle(st, stm);
Code: Select all
public partial class MyEventCallback : PDFXEdit.IEventHandler
{
public int documentView_ready = 0;
public void Start(PDFXEdit.IPXV_Inst inst)
{
documentView_ready = inst.Str2ID("e.documentView.ready");
inst.EventServer.RegisterNativeEventHandler(documentView_ready, this);
}
// PDFXEdit.IEventHandler
public void OnEvent(int nEventID, PDFXEdit.IEvent pEvent, object pFrom)
{
if (nEventID == documentView_ready)
{
PDFXEdit.IPXV_DocumentView docView = (PDFXEdit.IPXV_DocumentView)pFrom;
docView.Obj.Parent.LI.SetStyle((int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoFloat, (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoFloat);
}
}
}
....
MyEventCallback eh = new MyEventCallback();
eh.Start(pdfCtl.Inst);
....
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.
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.
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Multi tab: hide/disable "drag and drop all tabs" SOLVED
Hi Vasyl,
Fantastic, thanks! Works like a charm.
Btw,
So, this must be called in the IUIX_ObjImpl implementation when pEvent.Code = e_Notify and ni.nCode = UIX_Notify_Layout_Changed, and then with this style:
As I want to be able to activate the items using this button:
So, case closed
-žarko
Fantastic, thanks! Works like a charm.
Btw,
Cannot be called once, as when tabs are rearranged (sorted) the gripper button will re-display.To hide the unnecessary buttons use it once:..
So, this must be called in the IUIX_ObjImpl implementation when pEvent.Code = e_Notify and ni.nCode = UIX_Notify_Layout_Changed, and then with this style:
Code: Select all
layout.Root[0].SetStyle(UIX_LayoutItemStyle_NoTabBarGripperBtn, UIX_LayoutItemStyle_NoTabBarGripperBtn OR UIX_LayoutItemStyle_ShowTabsThumbsBtn)
So, case closed
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Multi tab: hide/disable "drag and drop all tabs"
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: Multi tab: hide/disable "drag and drop all tabs"
Yes, you are right - this wrong behavior caused by using the "Sort All Tabs Alphabetically" menu-item from the context menu.Cannot be called once, as when tabs are rearranged (sorted) the gripper button will re-display.
We will fix that issue in the near future and instead of using it:
Code: Select all
PDFXEdit.IUIX_LayoutItem tabsContainer = pdfCtl.Frame.View.DocViewsArea.Panes.Layout.Root[0];
int st = (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoTabBarGripperBtn;
int stm = (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoTabBarGripperBtn | (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_ShowSortedTabsBtn;
tabsContainer.SetStyle(st, stm);
Code: Select all
int ncst = pdfCtl.Frame.View.DocViewsArea.Panes.Layout.NewContainerStyle;
ncst |= (int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoTabBarGripperBtn;
ncst &= ~(int)PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_ShowSortedTabsBtn;
pdfCtl.Frame.View.DocViewsArea.Panes.Layout.NewContainerStyle = ncst;
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.
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.
-
- User
- Posts: 1371
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Multi tab: hide/disable "drag and drop all tabs"
Hi Vasyl,
Great. Eagerly waiting for the next update...
-žarko
Great. Eagerly waiting for the next update...
-žarko
- Tracker Supp-Stefan
- Site Admin
- Posts: 17907
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact: