Hide tab close button on document bar
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 tab close button on document bar
Is there a way to hide the close tab button on the multi document bar. Not the close tab button that exists on the tab itself, I can hide this, I am talking about the one shown in the image below?
Thanks
Simon
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hide tab close button on document bar
Hello Simon,
Same code, only with UIX_LayoutItemStyle_CloseActiveTabBtn
Cheers,
Alex
Same code, only with UIX_LayoutItemStyle_CloseActiveTabBtn
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Hide tab close button on document bar
Alex,
I have tried the following but it is still showing the close button
Any ideas? Does this have to be called after opening each document or something?
Thanks
Simon
I have tried the following but it is still showing the close button
Code: Select all
Dim layout As PDFXEdit.IUIX_Layout = Me.docPreview.Inst.MainFrm(1).View.DocViewsArea.Panes.Layout
layout.Root(0).SetStyle(CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_CloseActiveTabBtn), CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_CloseActiveTabBtn))
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hide tab close button on document bar
Hello Simon,
If I remember correctly, I already told this one before, though I will duplicate it again - yes, you should use that code in the e.document.viewingStarted event.
Cheers,
Alex
If I remember correctly, I already told this one before, though I will duplicate it again - yes, you should use that code in the e.document.viewingStarted event.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Hide tab close button on document bar
Alex,
I have also tried this under the viewingStarted event, however it still appears.
Please see image below of test within the FullDemo project:
Using the below code:
Thanks
Simon
I have also tried this under the viewingStarted event, however it still appears.
Please see image below of test within the FullDemo project:
Using the below code:
Code: Select all
else if (e.nEventID == nIDS[(int)IDS.e_document_viewingStarted])
{
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);
layout.Root[0].SetStyle(Convert.ToInt32(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_CloseActiveTabBtn), Convert.ToInt32(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_CloseActiveTabBtn));
}
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hide tab close button on document bar
Hello Simon,
First of all that's one nice if clause - expect a crash soon.
Second, you have added the Close Active Tab Button not removed it.
Cheers,
Alex
First of all that's one nice if clause - expect a crash soon.
Second, you have added the Close Active Tab Button not removed it.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Hide tab close button on document bar
Thanks for the update, let's get back to VB where I am more comfortable.
I have tried the following, but this does not work, obviously I am doing something wrong?
Thanks
Simon
I have tried the following, but this does not work, obviously I am doing something wrong?
Code: Select all
ElseIf e.nEventID = nIDS(CInt(IDS.e_document_viewingStarted)) Then
Dim layout As PDFXEdit.IUIX_Layout = Me.docPreview.Inst.MainFrm(1).View.DocViewsArea.Panes.Layout
For Each docLayout As PDFXEdit.IUIX_LayoutItem In layout.Root
docLayout.SetStyle(CInt(False), CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_CloseActiveTabBtn))
Next
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hide tab close button on document bar
Hello Simon,
We've put this into the schedule list and will look at it when we have time.
Cheers,
Alex
We've put this into the schedule list and will look at it when we have time.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Hide tab close button on document bar
Alex,
A bit more information. I am running the following code.
These lines work as expected:
layout.Root(0).SetStyle(False, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_AddNewTabBtn))
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_HideCloseTabsBtn))
These lines seem to have no affect:
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoFloat))
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_TabsNoReorder))
layout.Root(0).SetStyle(False, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_CloseActiveTabBtn))
Really hoping for a fix on this as this could cause errors in my tool.
Thanks
Simon
A bit more information. I am running the following code.
These lines work as expected:
layout.Root(0).SetStyle(False, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_AddNewTabBtn))
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_HideCloseTabsBtn))
These lines seem to have no affect:
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoFloat))
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_TabsNoReorder))
layout.Root(0).SetStyle(False, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_CloseActiveTabBtn))
Code: Select all
ElseIf e.nEventID = nIDS(CInt(IDS.e_document_viewingStarted)) Then
Dim layout As PDFXEdit.IUIX_Layout = Me.docPreview.Inst.MainFrm(1).View.DocViewsArea.Panes.Layout
For Each docLayout As PDFXEdit.IUIX_LayoutItem In layout.Root
layout.Root(0).SetStyle(False, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_AddNewTabBtn))
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_HideCloseTabsBtn))
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_NoFloat))
layout.Root(0).SetStyle(True, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_TabsNoReorder))
layout.Root(0).SetStyle(False, CInt(PDFXEdit.UIX_LayoutItemStyleFlags.UIX_LayoutItemStyle_CloseActiveTabBtn))
Next
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hide tab close button on document bar
Hello Simon,
Are you testing this on VB.Net or VB6?
Cheers,
Alex
Are you testing this on VB.Net or VB6?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Hide tab close button on document bar
Alex,
.NET
Thanks
Simon
.NET
Thanks
Simon
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hide tab close button on document bar
Hello Simon,
Everything's working on our side: Cheers,
Alex
Everything's working on our side: Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ