eDocEngine VCL Professional Help » Symbol Reference » Namespaces of Helper Classes » gtExPDFEng Namespace » TgtPDFFormCheckBox Class
Gnostice eDocEngine VCL Developer Guide
|
This class represents a check box form field.
public TgtPDFFormCheckBox = class(TgtPDFFormField);
public: class TgtPDFFormCheckBox : public TgtPDFFormField;
Check box form fields are used to answer yes-or-no type of questions. When a user selects a check box, the viewer application displays a "checked" symbol in the check box. A check box is submitted only when it is checked. Otherwise, it is not submitted with the rest of the form. An application that processes the submitted form can ascertain that the check box was selected by checking whether a form field with that name was submitted.
gtExPDFEng
procedure TForm1.Demo_TgtPDFFormCheckBox; var gtPDFFormCheckBox1, gtPDFFormCheckBox2: TgtPDFFormCheckBox; gtPDFFormPushButton1: TgtPDFFormPushButton; gtPDFEngine1: TgtPDFEngine; begin gtPDFEngine1 := TgtPDFEngine.Create(Nil); // Create a check box form field gtPDFFormCheckBox1 := TgtPDFFormCheckBox.Create; gtPDFFormCheckBox1.Rect := gtRect(1, 1.2, 1.1, 1.3); gtPDFFormCheckBox1.FieldName := 'ckbMilk'; // Create another check box form field gtPDFFormCheckBox2 := TgtPDFFormCheckBox.Create; gtPDFFormCheckBox2.Rect := gtRect(2, 1.2, 2.1, 1.3); gtPDFFormCheckBox2.FieldName := 'ckbSugar'; // Create a push button form field gtPDFFormPushButton1 := TgtPDFFormPushButton.Create; gtPDFFormPushButton1.Rect := gtRect(1, 2, 2, 2.3); gtPDFFormPushButton1.FieldName := 'pbSubmit'; gtPDFFormPushButton1.BorderColor := clGray; gtPDFFormPushButton1.NormalCaption := 'Submit Order'; gtPDFFormPushButton1.RolloverCaption := 'Submit Order'; gtPDFFormPushButton1.DownCaption := 'Submit Order'; gtPDFFormPushButton1.SubmitURL := 'http://www.gnostice.com/newsletters/demos/200804/forms_test.asp'; gtPDFFormPushButton1.Action := pbaSubmit; with gtPDFEngine1 do begin Preferences.ShowSetupDialog := False; Preferences.OpenAfterCreate := True; FileName := 'checkbox_formfield.pdf'; BeginDoc; TextOut(1, 1, 'In your tea, you would like:'); TextOut(1.2, 1.2, 'Milk'); TextOut(2.2, 1.2, 'Sugar'); // Add the form fields to page 1 AddFormItem(gtPDFFormCheckBox1); AddFormItem(gtPDFFormCheckBox2); AddFormItem(gtPDFFormPushButton1); EndDoc; end; end;
|
Name |
Description |
![]() |
Specifies background color of the form field. | |
![]() |
Specifies border color of the form field. | |
![]() |
Whether the form field is checked. | |
![]() |
Specifies name of the form field. | |
![]() |
Specifies font used to display the contents of the form field. | |
![]() |
Specifies settings applicable to the form field. | |
![]() |
Specifies location on the page where the form field is displayed. | |
![]() |
Specifies check mark symbol in the check box. |