Get strokecolor of selected Polygon

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
magthenop
User
Posts: 43
Joined: Tue Sep 07, 2010 8:35 am

Get strokecolor of selected Polygon

Post by magthenop »

Hi!

How can I get the strokecolor of a selected Polygon?

i have tried with a number of things,
This is the latest (but it does not work):

'a = this.selectedAnnots; if (a.length) { var p = a[0].getProps(); p.strokecolor; };';

I am executing this string with RunJavaScript and want to get a string in return that I can use on another object.
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17814
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Get strokecolor of selected Polygon

Post by Tracker Supp-Stefan »

Hello magthenop,

Properties names are case sensitive. The below (executed in the end user Editor through the JS console, does print out "RGB,1,0,0" for a selected polygon object with red colour:

Code: Select all

a = this.selectedAnnots; if (a.length) { var p = a[0].getProps(); p.strokeColor; };
console.println(p.strokeColor);
Regards,
Stefan
magthenop
User
Posts: 43
Joined: Tue Sep 07, 2010 8:35 am

Re: Get strokecolor of selected Polygon

Post by magthenop »

:-) Jepp, that did the trick!
Thanks
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17814
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Get strokecolor of selected Polygon

Post by Tracker Supp-Stefan »

:)
Post Reply