当前位置: 首页>>代码示例>>C#>>正文


C# DocumentBuilder.InsertComboBox方法代码示例

本文整理汇总了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);
        }
开发者ID:joyang1,项目名称:Aspose_Words_NET,代码行数:8,代码来源:Program.cs

示例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);
        }
开发者ID:aspose-words,项目名称:Aspose.Words-for-.NET,代码行数:13,代码来源:DocumentBuilderInsertElements.cs

示例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.");
        }
开发者ID:aspose-words,项目名称:Aspose.Words-for-.NET,代码行数:14,代码来源:InsertFormFields.cs

示例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");
        }
开发者ID:aspose-words,项目名称:Aspose.Words-for-.NET,代码行数:21,代码来源:Program.cs

示例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
        }
开发者ID:joyang1,项目名称:Aspose_Words_NET,代码行数:13,代码来源:ExDocumentBuilder.cs

示例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
        }
开发者ID:joyang1,项目名称:Aspose_Words_NET,代码行数:41,代码来源:ExDocumentBuilder.cs

示例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
        }
开发者ID:aspose-words,项目名称:Aspose.Words-for-.NET,代码行数:36,代码来源:ExDocumentBuilder.cs


注:本文中的DocumentBuilder.InsertComboBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。