←Select platform

CreateSingleSelectionField Method

Summary

Creates a new SingleSelectionField with automatically filled out field values recognized by Ocr.

Syntax
C#
C++/CLI
Python
public SingleSelectionField CreateSingleSelectionField( 
   List<FormField> formFields, 
   LeadRect bounds, 
   int formPageNumber 
) 
public:  
   SingleSelectionField^ CreateSingleSelectionField( 
      List<FormField^>^ formFields, 
      LeadRect^ bounds, 
      Int32 formPageNumber 
   ) 
def CreateSingleSelectionField(self,formFields,bounds,formPageNumber): 

Parameters

formFields

A FormField list that contains all fields, including the OmrFormField fields within the bounds.

bounds

A LeadRect that represents the location of the SingleSelectionField to be created.

formPageNumber

Master form page number.

Return Value

A SingleSelectionField field with automatically filled out field values.

Remarks

Each field value is filled out with the Ocr text recognized on the right side of the corresponding OmrFormField. If no Ocr text is recognized, the user needs to fill out each SingleField value.

Example
C#
using Leadtools; 
using Leadtools.Ocr; 
using Leadtools.Forms.Common; 
using Leadtools.Forms.Processing; 
using Leadtools.Forms.Auto; 
using Leadtools.Codecs; 
 
 
///This example shows how to create a SingleSelectionField. 
public void AddSingleSelectionField() 
{ 
   DiskMasterForm diskMasterForm = GetMasterForm("LeadAnswerSheet_Pattern"); 
   LeadRect bounds = new LeadRect(3160, 3070, 1250, 1240); 
   FormPages formPages = diskMasterForm.ReadFields(); 
   List<FormField> omrFields = GetOmrFields(formPages); 
 
   // Automatically create SingleSelectionField 
   SingleSelectionField singleSelectionField = diskMasterForm.CreateSingleSelectionField(omrFields, bounds, 1); 
 
   formPages.GetPage(1).Add(singleSelectionField); 
 
   // Write fields to master form 
   diskMasterForm.WriteFields(formPages); 
} 
Requirements

Target Platforms

Help Version 22.0.2023.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Forms.Auto Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.