Information bar – Kofax DOKuStar Validation User Manual

Page 99

Advertising
background image

DOKuStar Validation Programming Manual

Page

95

Information Bar

The information bar is one of the windows of the Validation’s user interface; when the program starts, it is located
above the field source bar (which displays the field’s snippet), but it can be moved around like any another window.

This information bar can be filled by software, in order to display messages to the validation operator. To do so,
there is a class

StatusTextTransporter

. Define an object of this class (preferably as a global variable) and use

its

Text

property to display a text:

Option Explicit

Public infoBar As New StatusTextTransporter

Private Sub Application_OnProjectLoaded(ByVal App As Application)
infoBar.Text = "Hello InfoBar"
End Sub

While the

Text

property displays the text in a standard format and size, the

HtmlText

property allows you to

format the text individually by using standard HTML tags. The following example will display the text bold,
enlarged, and in italics:

Option Explicit

Public infoBar As New StatusTextTransporter

Public WithEvents DateField As FieldType

Private Function DateField_OnFieldChanging(ByVal Field As Field, ByVal SubField As Field, _
ByVal VerifyEventArgs As VerifyEventArgs) As Boolean
DateField_OnFieldChanging = True
If Not ValidDate(Field.Value) Then
infoBar.HtmlText = "<b> <h1> <i> Invalid Date </i> </h1> </b>"
End If
End Function

Private Function ValidDate(fieldValue As String) As Boolean
'* code to check the format
End Function

The result will look like this:

Advertising