GUI Editor..

PDF-XChange Editor SDK for Developers

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.
Post Reply
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

GUI Editor..

Post by lidds »

I have opened your FullDemo project and have found the Preferences>Customize UI form. However I was hoping that you can tell me how to access / change the settings in the red box. Currently I have found the following with your FullDemo project, but am unclear how to access all the form properties.

Code: Select all

        Dim pr As PDFXEdit.ICabNode = Me.docPreview.Inst.Settings("CustomUI")

        ' setup colors
        Dim clrArr As PDFXEdit.ICabNode = pr("Colors")
        SetCustColor(clrArr, "base", "rgbd(255,255,255)")
        SetCustColor(clrArr, "window", "rgbd(255,255,255)")

        Me.docPreview.Inst.Settings("CustomUI.Backgrounds.Main.Style").v = "S"
        Me.docPreview.Inst.Settings("CustomUI.Backgrounds.Main.ShowOverlay").v = False
        Me.docPreview.Inst.Settings("CustomUI.Backgrounds.Dialog.Style").v = "S"
        Me.docPreview.Inst.Settings("CustomUI.Backgrounds.Dialog.ShowOverlay").v = False

        Me.docPreview.Inst.FireAppPrefsChanged(PDFXEdit.PXV_AppPrefsChanges.PXV_AppPrefsChange_CustomUI)
As you can see I have managed to access some of the UI by looking at your Full Demo project, however I am unsure how to change the rest of the UI settings as shown in the attached image.

Please note I am using the Editor SDK
Attachments
PDFTrackerDialog.png
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: GUI Editor..

Post by Sasha - Tracker Dev Team »

Hello lidds,

From what I see, you have accessed them in your code (in the commented section) so describe what trouble are you having with it. Also, you can use the CabNodeExplorer to look into the CustomUI dictionary for possible data change:
https://forum.pdf-xchange.com/ ... 66&t=25943

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

Re: GUI Editor..

Post by lidds »

Alex,

Basically what I want to do is make all of PDF-XChange forms white so as to match the Office 2013 white and blue theme of my application. But for some reason the below code does not achieve this and the forms are still gray. Can you confirm that rgbd(255,255,255) is white?

Code: Select all

Dim pr As PDFXEdit.ICabNode = Me.docPreview.Inst.Settings("CustomUI")

        Dim clrArr As PDFXEdit.ICabNode = pr("Colors")
        SetCustColor(clrArr, "base", "rgbd(255,255,255)")
        SetCustColor(clrArr, "window", "rgbd(255,255,255)")
        SetCustColor(clrArr, "selection", "rgbd(205,230,247)")

        Me.docPreview.Inst.Settings("CustomUI.Backgrounds.Main.Style").v = "S"
        Me.docPreview.Inst.Settings("CustomUI.Backgrounds.Main.ShowOverlay").v = False
        Me.docPreview.Inst.Settings("CustomUI.Backgrounds.Dialog.Style").v = "S"
        Me.docPreview.Inst.Settings("CustomUI.Backgrounds.Dialog.ShowOverlay").v = False

        Me.docPreview.Inst.FireAppPrefsChanged(PDFXEdit.PXV_AppPrefsChanges.PXV_AppPrefsChange_CustomUI)
As you can see from the attached image.

Thanks

Simon
Attachments
This is what it happening using my code
This is what it happening using my code
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: GUI Editor..

Post by Sasha - Tracker Dev Team »

Hello Simon,

That's because you have't specified their color:

Code: Select all

SetCustColor(clrArr, "main.bg", "rgbd(255,255,255)");
SetCustColor(clrArr, "dlg.bg", "rgbd(255,255,255)");
SetCustColor(clrArr, "pg.bg", "rgbd(255,255,255)");
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

Re: GUI Editor..

Post by lidds »

Thanks Alex,

One last question. How can I specify the 'Selection' and 'Highlight' colour?

I've tried the following, but this does not work.

Code: Select all

SetCustColor(clrArr, "selection", "rgbd(205,230,247)")
SetCustColor(clrArr, "highlight", "rgbd(205,230,247)")
Thanks

Simon
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: GUI Editor..

Post by Sasha - Tracker Dev Team »

Hello Simon,

This code should work for the selection - try selecting the text with the Select Text Tool:

Code: Select all

SetCustColor(clrArr, "selection", "rgbd(255,255,0)")
And this should work for the highlight:

Code: Select all

SetCustColor(clrArr, "hot", "rgbd(0,255,0)")
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

Re: GUI Editor..

Post by lidds »

Alex,

I will try this however I was referring to the hover and selection colour of the gui controls such as scrollbars and buttons. Will this code change those as well?

Thanks

Simon
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: GUI Editor..

Post by Sasha - Tracker Dev Team »

Hello Simon,

Please check this post and topic:
https://forum.pdf-xchange.com/ ... 38#p108255

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply