These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

select all items in a list

DianaL
Registered: Nov 17 2009
Posts: 80

Hi guys,

I have another question.

I have a listbox and want to select by pushing a button all populated items in the list.
this is my code.

it doesnt work, could anyone tell me what is wrong??

and second question. Is it possible deselect single items, when all are selected?

var temp1 = "";
for (i=0;i< PAGE3.ListBox1.length.rawValue;i++){
temp1 = temp1 + ListBox1.getDisplayItem(i) + "\n";

}
ListBox1.rawValue = temp1

I appreciate your help!!!

Thanks,

Diana

Bamboolian
Registered: Jul 27 2010
Posts: 48
Hi,

object.length property provides number so no need to use rawValue property.
also, it should be better if you use getSaveItem method i/o getDisplayItem method since stored value in ListBox.rawValue would be data not displayed value.
var strWork = ""; for (var i = 0; i < ListBox1.length ; i++){strWork += ListBox1.getSaveItem(i) + "\n";} ListBox1.rawValue = strWork;

second question about deselecting one, it can be done by clicking with ctrl button held down.