Class PdfLoadedListItem
- Namespace
- Syncfusion.Pdf.Parsing
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents loaded list item.
public class PdfLoadedListItem
- Inheritance
-
PdfLoadedListItem
- Inherited Members
Examples
//Load an existing document
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
// Load the list box field
PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
// Get the selected list item
PdfLoadedListItem listItem = listField.SelectedItem;
listItem.Text = "NewText";
doc.Save("Form.pdf");
doc.Close(true);
'Load an existing document
Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
' Load the list box field
Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
' Get the selected list item
Dim listItem As PdfLoadedListItem = listField.SelectedItem
listItem.Text = "NewText"
doc.Save("Form.pdf")
doc.Close(True)
Constructors
PdfLoadedListItem(string, string)
Initializes a new instance of the PdfLoadedListItem class with the specific text and value.
public PdfLoadedListItem(string text, string value)
Parameters
Examples
// Load the list box field
PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
// Get the selected list item
PdfLoadedListItem listItem = new PdfLoadedListItem("C#.Net",".NET Course");
// Add the list item in list field
listField.Values.Add(listItem);
' Load the list box field
Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
' Get the selected list item
Dim listItem As PdfLoadedListItem = New PdfLoadedListItem("C#.Net",".NET Course")
' Add the list item in list field
listField.Values.Add(listItem)
- See Also
Properties
Text
Gets or sets the text of the list item.
public string Text { get; set; }
Property Value
- string
A string value representing the display text of the item.
Examples
//Load an existing document
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
// Load the list box field
PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
// Get the selected list item
PdfLoadedListItem listItem = listField.SelectedItem;
listItem.Text = "NewText";
doc.Save("Form.pdf");
doc.Close(true);
'Load an existing document
Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
' Load the list box field
Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
' Get the selected list item
Dim listItem As PdfLoadedListItem = listField.SelectedItem
listItem.Text = "NewText"
doc.Save("Form.pdf")
doc.Close(True)
- See Also
Value
Gets or sets the value of the list item.
public string Value { get; set; }
Property Value
- string
A string value representing the value of the item.
Examples
//Load an existing document
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
// Load the list box field
PdfLoadedListBoxField listField = doc.Form.Fields["Course"] as PdfLoadedListBoxField;
// Get the selected list item
PdfLoadedListItem listItem = listField.SelectedItem;
listItem.Value = "C#.NET";
doc.Save("Form.pdf");
doc.Close(true);
'Load an existing document
Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
' Load the list box field
Dim listField As PdfLoadedListBoxField = TryCast(doc.Form.Fields("Course"), PdfLoadedListBoxField)
' Get the selected list item
Dim listItem As PdfLoadedListItem = listField.SelectedItem
listItem.Value = "C#.NET"
doc.Save("Form.pdf")
doc.Close(True)
- See Also