UISelection Object

PreviousNext

Selection class can contain different named item values

(c) 20011 Hermetech International Ltd.

Many of the dialog methods in the UserInterfaces class return a UISelection object. The UISelection object is a utility class which allows multiple named items and values to be returned consolidated into one object.

 

Consider the ChooseHL7Vendor() Method (see Other Dialogs). It presents a dialog to the user to select an EasyHL7 Vendor definition from a list and looks like this when invoked.

 

ChooseVendor() Method

ChooseVendor() Method

 

Compare this to the example code to invoke this dialog.

 

    Dim obUI As New EasyHL7MC40_UI.UserInterfaces(MyVendorObject)

    Dim obSelection As EasyHL7MC40_UI.UISelection

    With obUI

      .VendorAccess.AllowVendorPathChange = False

      .ProductName = "My HL7 Application"

      obSelection = .ChooseVendor(MyVendorPath, "")

      If obSelection.HL7DialogResult <> Windows.Forms.DialogResult.OK Then

         Return

      End If

      'Note the named item 'VENDORID' in the Value() property

      'Depending on the dialog invoked there will be 

      'different named items available in the Value() property

      If Len(obSelection.Value("VENDORID")) > 0 Then 

        MyVendorID = obSelection.Value("VENDORID")

        MyVendorObject.OpenVendor(MyVendorID)

      End If            

    End With

 

 

Properties

 

Name: HL7DialogResult

Data Type: System.Windows.Forms.DialogResult

Description: The standard DialogResult of the invoked dialog.

Name: LastError

Data Type: String (Read Only)

Description: Will contain the last error message encountered by the object

See Also: IsError

Name: IsError

Data Type: Boolean (Read Only)

Description: Is True if the object encountered an error.

See Also: LastError

Name: Value(strNamedItem As String)

Data Type: String (Read Write)

Description: Gets or sets a named item identified with strNamedItem. When getting a value if strNamedItem does not exist an empty string ("") is returned. strNamedItem is NOT case sensitive.

Name: KeyList

Data Type: String (Read Only)

Description: A Tab-Delimited list of all named items available in the Value property.

Name: ValuesCount

Data Type: Integer

Description: The number of named items available through the Value property.

 

Methods

 

Name: ClearErrors

Returns: N/A -nothing

Descriptions: Clears the error state of the object.

See Also: IsError, LastError in the Properties above

[****]