Movicon Help on Line - Rel. 11.7.1301
The Movicon Combo Box objects are components which can be placed on anywhere on the screen to allow item lists (texts) to be displayed and edited. This object can be assigned with a numeric or string type variable. Each line of the list corresponds to a numeric value which is made available in the variable associated to the object, when this variable is numeric type. When the variable is string type, it will be updated with the text of the Item selected. Each time a line is selected, the Combo Box's variable is updated with the corresponding numeric value (the value is progressive, starting from 0 to indicate the first line) or with the text of the Item selected. However, when the variable is numeric type, no values will be displayed in the Combo Box's editing box, therefore, a string variable type should normally be used. In addition to the Combo Box, a second string type variable can be assigned and will be compiled with the text of the item to be displayed.
The Combo Box objects are available from the "Object" group in the "Toolbox Window".
Movicon Combo Box example
The Combo Box will display the Items during project processing, with the style and sizes setup through the "Properties Window".
You can also insert new items with the Combo Box by using the appropriate edit boxes.
The Combo box object can also be managed and compiled by using the Basic Script functions (DisplyCmdTarget and ListBoxCmdTarget interface). For instance, if you want to retrieve a combo box item list from a Button object ("ComboBox" is the name associated to object), the script code to insert in the Button will be:
Option Explicit
Dim objCombo As DrawCmdTarget
Dim objDisplay As DisplayEditCmdTarget
Dim objList As ListBoxCmdTarget
Dim sListItems As String
Public Sub Click()
Set objCombo = GetSynopticObject().GetSubObject("ComboBox")
Set objDisplay = objCombo.GetObjectInterface()
Set objList = objDisplay.GetComboListInterface
sListItems = objList.ListData
MsgBox("List items = " & objList.ListData,vbInformation,GetProjectTitle)
Set objDisplay = Nothing
Set objList = Nothing
Set objCombo = Nothing
End Sub