←Select platform

CreateBubbleWordField Method

Summary

Creates a new BubbleWordField with automatically filled out field values.

Syntax
C#
VB
C++
public BubbleWordField CreateBubbleWordField( 
   RasterImage image, 
   List<FormField> formFields, 
   LeadRect bounds, 
   int formPageNumber 
) 
Public Function CreateBubbleWordField( 
   ByVal image As RasterImage, 
   ByVal formFields As List(Of FormField 
), 
   ByVal bounds As LeadRect, 
   ByVal formPageNumber As Integer) As BubbleWordField 
public:  
   BubbleWordField^ CreateBubbleWordField( 
      RasterImage^ image, 
      List<FormField^>^ formFields, 
      LeadRect^ bounds, 
      Int32 formPageNumber 
   ) 

Parameters

image

The master form image.

formFields

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

bounds

A LeadRect represents the location of the BubbleWordField to be created.

formPageNumber

Master form page number.

Return Value

A BubbleWordField field with automatically filled out field values.

Remarks

If the row count is 26 the field values are filled with alphabets from A to Z and the BubbleWordValueType is set to Character. Otherwise, the field values are filled with numbers from 0 to the row count and the BubbleWordValueType is set to Numerical.

Example
C#
VB
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 BubbleWordField. 
public void AddBubbleWordField() 
{ 
   DiskMasterForm diskMasterForm = GetMasterForm("LeadAnswerSheet_Pattern"); 
   FormPages formPages = diskMasterForm.ReadFields(); 
   List<FormField> omrFields = GetOmrFields(formPages); 
   LeadRect bounds = new LeadRect(225, 5110, 2025, 1030); 
 
   //Automatically create BubbleWordField 
   BubbleWordField bubbleWordField = diskMasterForm.CreateBubbleWordField(diskMasterForm.ReadForm(), omrFields, bounds, 1); 
 
   // Set field name 
   bubbleWordField.Name = "StudentID"; 
 
   formPages.GetPage(1).Add(bubbleWordField); 
 
   // Write fields to master form 
   diskMasterForm.WriteFields(formPages); 
} 
Imports Leadtools 
Imports Leadtools.Ocr 
Imports Leadtools.Forms.Common 
Imports Leadtools.Forms.Processing 
Imports Leadtools.Forms.Auto 
Imports Leadtools.Codecs 
 
''' This example shows how to create a BubbleWordField. 
Public Sub AddBubbleWordField() 
   Dim diskMasterForm As DiskMasterForm = GetMasterForm("LeadAnswerSheet_Pattern") 
   Dim formPages As FormPages = diskMasterForm.ReadFields() 
   Dim omrFields As List(Of FormField) = GetOmrFields(formPages) 
   Dim bounds As LeadRect = New LeadRect(225, 5110, 2025, 1030) 
 
   ' Automatically create BubbleWordField 
   Dim bubbleWordField As BubbleWordField = diskMasterForm.CreateBubbleWordField(diskMasterForm.ReadForm(), omrFields, bounds, 1) 
 
   ' Set field name 
   bubbleWordField.Name = "StudentID" 
 
   formPages.GetPage(1).Add(bubbleWordField) 
 
   ' Write fields to master form 
   diskMasterForm.WriteFields(formPages) 
End Sub 

Requirements

Target Platforms

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

Leadtools.Forms.Auto Assembly