Visavi Visual OPC .NET  

OpcComboBox Class

Represents a Windows check box that binds to an OPC item.

For a list of all members of this type, see  OpcComboBox Members.

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            System.Windows.Forms.ListControl
               System.Windows.Forms.ComboBox
                 Visavi.Opc.Client.Forms.OpcComboBox

[Visual Basic]
 Public Class OpcComboBox
   Inherits OpcControl
[C#]
 public class OpcComboBox: OpcControl
[C++]
 public __gc class OpcComboBox : public OpcControl
[JScript]
public class OpcComboBox extends OpcControl

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

The OpcComboBox is required to be bound to an OPC item that has an EUType of Enumerated. An OpcComboBox displays an editing field combined with a ListBox, allowing the user to select from the list or to enter new text. The list is filled with the strings that are returned by the IOpcItemAttributes.Enumerations property. The default behaviour of ComboBox displays an edit field with a hidden drop-down list. The DropDownStyle property determines the style of combo box to display. You can enter a value that allows for a simple drop-down, where the list always displays, a drop-down list box, where the text portion is not editable and you must select an arrow to view the drop-down list box, or the default drop-down list box, where the text portion is editable and the user must press the arrow key to view the list.

To add objects to the list at run time, assign an array of object references with the AddRange method. The list then displays the default string value for each object. You can add individual objects with the Add method.

In addition to display and selection functionality, the OpcComboBox also provides features that enable you to efficiently add items to the OpcComboBox and to find text within the items of the list. The FindString and FindStringExact methods enable you to search for an item in the list that contains a specific search string.

You can use these properties to manage the currently selected item in the list, the Text property to specify the string displayed in the editing field, the SelectedIndex property to get or set the current item, and the SelectedItem property to get or set a reference to the object.

The OpcComboBox class provides properties that specify to which OPC Server to connect, when to connect to that server, and the OPC groups to add to the server after the connection is made. The ServerIdentifier property identifies the server to which the connection will be made. Using the designer's property grid, you may browse your network for the server, or you may type in a URI type string that identifies the server. The ConnectionScheme property determines when the client connects to the server (i.e. Runtime only, Design-time only, Manually, etc.). The ItemID is the OPC item to which when the connection with the OPC Server is made. After selecting the server, you may browse for the item using the designer's property grid.

Requirements

Namespace: Visavi.Opc.Client.Forms

Platforms:  Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows .NET Server family

Assembly: Visavi.Opc.Client.Forms

See Also

OpcComboBox Members | Visavi.Opc.Client.Forms Namespace