本文整理汇总了C#中DocumentBuilder.InsertComboBox方法的典型用法代码示例。如果您正苦于以下问题:C# DocumentBuilder.InsertComboBox方法的具体用法?C# DocumentBuilder.InsertComboBox怎么用?C# DocumentBuilder.InsertComboBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DocumentBuilder
的用法示例。
在下文中一共展示了DocumentBuilder.InsertComboBox方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static void Main(string[] args)
{
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
string[] items = { "One", "Two", "Three" };
builder.InsertComboBox("DropDown", items, 0);
}
示例2: InsertComboBoxFormField
public static void InsertComboBoxFormField(string dataDir)
{
// ExStart:DocumentBuilderInsertComboBoxFormField
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
string[] items = { "One", "Two", "Three" };
builder.InsertComboBox("DropDown", items, 0);
dataDir = dataDir + "DocumentBuilderInsertComboBoxFormField_out.doc";
doc.Save(dataDir);
// ExEnd:DocumentBuilderInsertComboBoxFormField
Console.WriteLine("\nCombobox form field using DocumentBuilder inserted successfully into a document.\nFile saved at " + dataDir);
}
示例3: Run
public static void Run()
{
// ExStart:InsertFormFields
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_WorkingWithFields();
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
string[] items = { "One", "Two", "Three" };
builder.InsertComboBox("DropDown", items, 0);
// ExEnd:InsertFormFields
Console.WriteLine("\nForm fields inserted successfully.");
}
示例4: Main
static void Main(string[] args)
{
// Check for license and apply if exists
string licenseFile = AppDomain.CurrentDomain.BaseDirectory + "Aspose.Words.lic";
if (File.Exists(licenseFile))
{
// Apply Aspose.Words API License
Aspose.Words.License license = new Aspose.Words.License();
// Place license file in Bin/Debug/ Folder
license.SetLicense("Aspose.Words.lic");
}
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert a Form Field
string[] items = { "One", "Two", "Three" };
builder.InsertComboBox("DropDown", items, 0);
doc.Save("FormFieldTest.docx");
}
示例5: DocumentBuilderInsertComboBoxFormField
public void DocumentBuilderInsertComboBoxFormField()
{
//ExStart
//ExFor:DocumentBuilder.InsertComboBox
//ExId:DocumentBuilderInsertComboBoxFormField
//ExSummary:Shows how to insert a combobox form field into a document.
Aspose.Words.Document doc = new Aspose.Words.Document();
DocumentBuilder builder = new DocumentBuilder(doc);
string[] items = { "One", "Two", "Three" };
builder.InsertComboBox("DropDown", items, 0);
//ExEnd
}
示例6: CreateForm
public void CreateForm()
{
//ExStart
//ExFor:TextFormFieldType
//ExFor:DocumentBuilder.InsertTextInput
//ExFor:DocumentBuilder.InsertComboBox
//ExFor:DocumentBuilder.InsertCheckBox
//ExSummary:Builds a sample form to fill.
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 = new string[]
{
"-- 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("");
// Insert a check box to ensure the form filler does look after his/her footwear.
builder.InsertCheckBox("", true, 0);
builder.Writeln("My boots are always polished and nice-looking.");
builder.Document.Save(ExDir + "DocumentBuilder.CreateForm Out.doc");
//ExEnd
}
示例7: CreateForm
public void CreateForm()
{
//ExStart
//ExFor:TextFormFieldType
//ExFor:DocumentBuilder.InsertTextInput
//ExFor:DocumentBuilder.InsertComboBox
//ExSummary:Builds a sample form to fill.
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 = new string[]
{
"-- 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(MyDir + @"\Artifacts\DocumentBuilder.CreateForm.doc");
//ExEnd
}