Dynamic combobox drop down menu items

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

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

Slava
User
Posts: 16
Joined: Wed Jun 27, 2007 7:55 pm

Dynamic combobox drop down menu items

Post by Slava »

Hi.

Is there a way to populate combobox menu items at runtime? How can I do that?

Thanks, Slava
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Dynamic combobox drop down menu items

Post by Stefan - PDF-XChange »

Hello Slava,

You can execure JS to update objects inside a PDF document,
Please check the "JavaScript ™ for Acrobat ® API Reference".

Best,
Stefan
Slava
User
Posts: 16
Joined: Wed Jun 27, 2007 7:55 pm

Re: Dynamic combobox drop down menu items

Post by Slava »

Hi, Stefan.

Thanks for reference.

The code below worked.

var c = this.getField("DepartmentNames");

c.setItems([
["Online Help", "http://www.example.com/myhelp.html"],
["How to Print", "http://www.example.com/myhelp.html#print"],
["How to eMail", "http://www.example.com/myhelp.html#email"]
]);
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: Dynamic combobox drop down menu items

Post by Stefan - PDF-XChange »

Great to hear Slava!

Cheers,
Stefan