See Also

Button Members  | ceTe.DynamicPDF.PageElements.Forms Namespace

Requirements

Namespace: ceTe.DynamicPDF.PageElements.Forms

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

Language

Visual Basic

C#

Show All

Represents the button field of a interactive forms. A button is a purely interactive control that responds immediately to user input without retaining a permanent value.

For a list of all members of this type, see Button members.

Object Model








Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.PageElement
      ceTe.DynamicPDF.PageElements.Forms.FormElement
         ceTe.DynamicPDF.PageElements.Forms.Button

Syntax

[Visual Basic]
Public Class Button    Inherits FormElement
[C#]
public class Button : FormElement

Remarks

For more details on button fields take a look at the Interactive Forms topic.

NOTE: This page element cannot be used within a table cell, or tranformation group.

Example

This example shows how to create an Button and Add it to the page.

[Visual Basic] 

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms

Module MyModule

    Sub Main()

        ' Create a PDF Document
        Dim MyDocument As Document = New Document

        ' Create a PDF Page
        Dim MyPage As Page = New Page(PageSize.Letter)

        ' Create an Button
        Dim MyButton As Button = New Button("btn", 50, 50, 100, 50)
        MyButton.Action = New JavaScriptAction("app.alert('Hello');")
        MyButton.BackgroundColor = RgbColor.AliceBlue
        MyButton.Behavior = Behavior.CreatePush("downLabel", "rolloverLabel")
        MyButton.BorderColor = RgbColor.BlueViolet
        MyButton.BorderStyle = BorderStyle.Beveled
        MyButton.Label = "Push"
        MyButton.TextColor = RgbColor.DarkGreen
        MyButton.ToolTip = "Click"

        ' Add the Button to the page
        MyPage.Elements.Add(MyButton)

        ' Add pages to the document
        MyDocument.Pages.Add(MyPage)

        ' Save the PDF document
        MyDocument.Draw("C:\MyDocument.pdf")

    End Sub
End Module

[C#] 

using System; 
using ceTe.DynamicPDF; 
using ceTe.DynamicPDF.PageElements.Forms; 
 
class MyClass 

    static void Main() 
    { 
        // Create a PDF Document 
        Document document = new Document(); 
         
        // Create a PDF Page 
        Page page = new Page( PageSize.Letter ); 
         
        // Create an Button 
        Button button = new Button( "btn", 50, 50, 100, 50 ); 
        button.Action = new JavaScriptAction( "app.alert('Hello');" ); 
        button.BackgroundColor = RgbColor.AliceBlue; 
        button.Behavior = Behavior.CreatePush( "downLabel", "rolloverLabel" ); 
        button.BorderColor = RgbColor.BlueViolet; 
        button.BorderStyle = BorderStyle.Beveled; 
        button.Label = "Push"; 
        button.TextColor = RgbColor.DarkGreen; 
        button.ToolTip = "Click"; 
         
        // Add the Button to the page 
        page.Elements.Add( button ); 
         
        // Add pages to the document 
        document.Pages.Add( page ); 
         
        // Save the PDF document 
        document.Draw( @"C:\MyDocument.pdf" ); 
    } 
}

Licensing

This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:

Requirements

Namespace: ceTe.DynamicPDF.PageElements.Forms

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

See Also

Button Members  | ceTe.DynamicPDF.PageElements.Forms Namespace

 

 


© Copyright 2007, ceTe Software