eDocEngine VCL Professional Help » Symbol Reference » Namespaces of Helper Classes » gtExPDFEng Namespace » TgtPDFFormRadioItem Class

Gnostice eDocEngine VCL Developer Guide
TgtPDFFormRadioItem Class

This class represents a radio button item.

Pascal
public TgtPDFFormRadioItem = class(TgtPDFFormField);
C++
public: class TgtPDFFormRadioItem : public TgtPDFFormField;
Description

A group of radio button items can represent a single radio button. 

A radio button item is an option in a radio button. Each radio button item hold a different value for the same radio button.

gtExPDFEng

procedure TForm1.Demo_TgtPDFFormRadioButton;
var
  gtPDFFormRadioItem1, gtPDFFormRadioItem2: TgtPDFFormRadioItem;
  gtPDFFormRadioButton1: TgtPDFFormRadioButton;
  gtPDFFormPushButton1: TgtPDFFormPushButton;
  gtPDFEngine1: TgtPDFEngine;
begin
  gtPDFEngine1 := TgtPDFEngine.Create(Nil);

  // Create a radio button *item*
  gtPDFFormRadioItem1 := TgtPDFFormRadioItem.Create;
  gtPDFFormRadioItem1.Rect := gtRect(1, 1, 1.1, 1.1);
  gtPDFFormRadioItem1.Value := 'Tea';

  // Create anoter radio button *item*
  gtPDFFormRadioItem2 := TgtPDFFormRadioItem.Create;
  gtPDFFormRadioItem2.Rect := gtRect(2, 1, 2.1, 1.1);
  gtPDFFormRadioItem2.Value := 'Coffee';

  // Create a radio *button*
  gtPDFFormRadioButton1 := TgtPDFFormRadioButton.Create;
  gtPDFFormRadioButton1.FieldName := 'rbRefreshments';
  gtPDFFormRadioButton1.AtleastOneSelectedItem := True;
  gtPDFFormRadioButton1.Symbol := pfcsStar;

  // Add the radio button items to the radio button
  gtPDFFormRadioButton1.AddItem(gtPDFFormRadioItem1);
  gtPDFFormRadioButton1.AddItem(gtPDFFormRadioItem2);

  // 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 := 'radiobutton_formfield.pdf';

    BeginDoc;
    TextOut(1, 0.8, 'Refreshments:');
    TextOut(1.2, 1, 'Tea');
    TextOut(2.2, 1, 'Coffee');
    // Add the form fields to current page
    AddFormItem(gtPDFFormRadioButton1);
    AddFormItem(gtPDFFormPushButton1);
    EndDoc;
  end;

end;

 


 

 


Properties
TgtPDFFormRadioItem Class
 
Name 
Description 
 
Specifies background color of the form field. 
 
Specifies border color of the form field. 
 
Rect 
Specifies location on the page where the form field is displayed. 
 
Specifies value of the form field. 
Methods
TgtPDFFormRadioItem Class
 
Name 
Description