DocumentBuilderInsertComboBox Method |
Namespace: Aspose.Words
If you specify a name for the form field, then a bookmark is automatically created with the same name.
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); string[] items = { "One", "Two", "Three" }; builder.InsertComboBox("DropDown", items, 0);
DocumentBuilder builder = new DocumentBuilder(); // Insert a text form field for input a name builder.InsertTextInput("", TextFormFieldType.Regular, "", "Enter your name here", 30); // Insert two blank lines builder.Writeln(""); builder.Writeln(""); string[] items = { "-- Select your favorite footwear --", "Sneakers", "Oxfords", "Flip-flops", "Other", "I prefer to be barefoot" }; // Insert a combo box to select a footwear type builder.InsertComboBox("", items, 0); // Insert 2 blank lines builder.Writeln(""); builder.Writeln(""); builder.Document.Save(ArtifactsDir + "DocumentBuilder.CreateForm.doc");