Can a list box object flow? My form uses one as the user adds attachments the file names appear in the list box. When too many files have been added to be visible in the size of the list box, a scroll bar appears. Can I have the list box flow instead?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi DKinsley,
Place below code on click event of "Add Attach" button".
app.execMenuItem("AddFileAttachment");
var oObj = event.target;
var fileAttachments = oObj.dataObjects;
//app.alert(fileAttachments.length);
var d = event.target.dataObjects;
TextField1.rawValue=" ";
for (var i = 0; i <= fileAttachments.length; i++)
{
TextField1.rawValue = TextField1.rawValue + "\n" + d[i].name;
}
Below is the screenshot of my form structure
.
Thanks
Ratnesh
Views
Replies
Total Likes
Hi DKinsley,
Logically this is not possible because if you will make the list box flowed then it will no linger be a list box and will look like a text Field.
Please navigate to http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?topic=000323 page to know more about List Box.
You can use a textfield to display the attachment's name and can make it flowed.
Regards,
Ratnesh
Views
Replies
Total Likes
Ratnesh,
Thank you for your reply and information. I am unable to get the same script to display the attachment's name in a Textfield named ListBox1. What do I need to change?
form1.#subform[0].Attachments.Button1::click - (JavaScript, client)
var d = new Date();
var myDoc = event.target;
var sFile = "myFile" + Math.floor(d/1000);
myDoc.importDataObject({cName: sFile});
var myDataObject = myDoc.getDataObject(sFile);
var sFileName = myDataObject.path;
ListBox1.addItem(sFileName,sFile);
NumericField1.rawValue = NumericField1.rawValue + 1;
Views
Replies
Total Likes
Anyone know the answer to this?
Views
Replies
Total Likes
Hi DKinsley,
Place below code on click event of "Add Attach" button".
app.execMenuItem("AddFileAttachment");
var oObj = event.target;
var fileAttachments = oObj.dataObjects;
//app.alert(fileAttachments.length);
var d = event.target.dataObjects;
TextField1.rawValue=" ";
for (var i = 0; i <= fileAttachments.length; i++)
{
TextField1.rawValue = TextField1.rawValue + "\n" + d[i].name;
}
Below is the screenshot of my form structure
.
Thanks
Ratnesh
Views
Replies
Total Likes
Thank you Ratnesh.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies