Custom icon on document's Tab 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: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Custom icon on document's Tab
Hi support,
Can a custom icon be specified for document's tab, and changed from code (add/remove/change icon) when needed?
So, something like the icon that appears by default for protected documents.
-žarko
Can a custom icon be specified for document's tab, and changed from code (add/remove/change icon) when needed?
So, something like the icon that appears by default for protected documents.
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Hello žarko,
This is not available via the SDK, though I will ask whether we can add this to the IUIX_LayoutItem methods in the future.
Cheers,
Alex
This is not available via the SDK, though I will ask whether we can add this to the IUIX_LayoutItem methods in the future.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Hello žarko,
These methods will be available from the next release for the IUIX_LayoutItem interface:
Cheers,
Alex
These methods will be available from the next release for the IUIX_LayoutItem interface:
Code: Select all
HRESULT TitlePrefix([out, retval] BSTR* pVal);
HRESULT TitlePrefix([in] BSTR sVal);
HRESULT TitlePrefixIcon([out, retval] IUIX_Icon** ppIcon);
HRESULT TitlePrefixIcon([in] IUIX_Icon* pIcon);
HRESULT TitleSuffix([out, retval] BSTR* pVal);
HRESULT TitleSuffix([in] BSTR sVal);
HRESULT TitleSuffixIcon([out, retval] IUIX_Icon** ppIcon);
HRESULT TitleSuffixIcon([in] IUIX_Icon* pIcon);
HRESULT TitlePrefixMixColor([out, retval] LONG* pVal);
HRESULT TitlePrefixMixColor([in] LONG nVal); // RGBA
HRESULT TitleSuffixMixColor([out, retval] LONG* pVal);
HRESULT TitleSuffixMixColor([in] LONG nVal); // RGBA
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Custom icon on document's Tab
Hi Support,
Is this a part of the 335 release? Not listed here: https://www.pdf-xchange.com/produc ... or/history
Edit (after installing the 335 version): yes a part of it
Edit2: I've tried setting TitlePrefix for a document tab - but nothing happens. Do I need to do additional calls after(?):
Only If I also do layoutItem.Title = "something new" - then the title will change and also include the prefix.
Edit3:
The prefix goes directly before title, while suffix has a space before the title (by design?). Also, suffix seems to be in bold style (by design, cannot change?). In all above cases (prefix, suffix, icons, colors), the title must be set to something different than the current title - for the tab display to be updated.
All in all, a handy new feature
-ž
Is this a part of the 335 release? Not listed here: https://www.pdf-xchange.com/produc ... or/history
Edit (after installing the 335 version): yes a part of it
Edit2: I've tried setting TitlePrefix for a document tab - but nothing happens. Do I need to do additional calls after(?):
Code: Select all
PDFXEdit.IPXV_Document doc = pdfCtl.Doc;
PDFXEdit.IPXV_DocumentView docView = doc.ActiveView;
PDFXEdit.IUIX_LayoutItem layoutItem = docView.Obj.Parent.LI;
layoutItem.TitlePrefix = "prefix"; //<- no changes to tab title
Edit3:
The prefix goes directly before title, while suffix has a space before the title (by design?). Also, suffix seems to be in bold style (by design, cannot change?). In all above cases (prefix, suffix, icons, colors), the title must be set to something different than the current title - for the tab display to be updated.
All in all, a handy new feature
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Hello žarko,
This should not be like this - we'll think what can be done with the space and the bold font and also the update should happen after you set prefix/suffix - this should be fixed from our side.
Cheers,
Alex
This should not be like this - we'll think what can be done with the space and the bold font and also the update should happen after you set prefix/suffix - this should be fixed from our side.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Custom icon on document's Tab
Thanks Alex.
-ž
-ž
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Custom icon on document's Tab
Hi support,
I'm trying to apply custom icon/prefix/suffix to a pane (any in Frame.View.Panes collection) - it seems this is not implemented?
-žarko
I'm trying to apply custom icon/prefix/suffix to a pane (any in Frame.View.Panes collection) - it seems this is not implemented?
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Hello žarko,
Can you make a screenshot on where do you want to place a icon?
Cheers,
Alex
Can you make a screenshot on where do you want to place a icon?
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Custom icon on document's Tab
Hi Alex,
Any pane in the MainView's Panes collection:
Code:
Any pane in the MainView's Panes collection:
Code:
Code: Select all
view : IPXV_View;
li : IUIX_LayoutItem;
...
view := pxv.Frame.View.Panes.Active[PDFXHelper.Inst.Str2ID('searchView', false)];
if Assigned(view) then
begin
li := pxv.Frame.View.Panes.Layout.GetItem(view.Obj);
if Assigned(li) then
begin
ttl := li.Title;
li.Title := '';
li.TitlePrefixIcon := PDFXHelper.InstUI.Theme.GetIcon('ico.oneDrive');
li.TitlePrefix := 'prefix';
li.Title := 'new ' + ttl;
end;
end;
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Hello žarko,
The layout suffix/prefix icon goes here (same as document): Cheers,
Alex
The layout suffix/prefix icon goes here (same as document): Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Custom icon on document's Tab
Hi Alex,
Sorry, I'm not sure I understand your answer
So, prefix/suffix/icon cannot be set for a LayoutItem for an arbitrary pane (IPXV_View) [even though I have access to pane's LayoutItem and can change the title in that way] ?
-žarko
Sorry, I'm not sure I understand your answer
So, prefix/suffix/icon cannot be set for a LayoutItem for an arbitrary pane (IPXV_View) [even though I have access to pane's LayoutItem and can change the title in that way] ?
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Hello žarko,
The icon won't be set in the header of the layout item, but in the tab of the layout item. Though I'm not sure whether this will work for panes at all, as we did not yet tried this from our native code except for document tabs.
Cheers,
Alex
The icon won't be set in the header of the layout item, but in the tab of the layout item. Though I'm not sure whether this will work for panes at all, as we did not yet tried this from our native code except for document tabs.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
Re: Custom icon on document's Tab
Hi Alex,
Thanks. I was hoping it will work for any IUIX_LayoutItem as stated by previous post in this topic.
Anyhow, I wanted to add a custom icon to my custom pane's title "bar" ....
-žarko
Thanks. I was hoping it will work for any IUIX_LayoutItem as stated by previous post in this topic.
Anyhow, I wanted to add a custom icon to my custom pane's title "bar" ....
-žarko
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab
Hello žarko,
Well I'm afraid that there is no such a method in the SDK.
Cheers,
Alex
Well I'm afraid that there is no such a method in the SDK.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 1372
- Joined: Thu Sep 05, 2019 12:35 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Custom icon on document's Tab SOLVED
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ