Syntax
Public Function GetComboBoxData(formID As String, ComboName As String, prop_Id As ENUM_GUI_COMBO_DATA, ByRef prop_Value As Variant) As Boolean
Description
This function is used to get data according to a given property Id for a specific ComboBox (GUI control).
Parameters
Key | Description |
formId | Form identifier, must be a number greater than 3000 and less than 10,000. |
ComboName | ComboBox identifier, value of type String. |
prop_Id | Value can be one of the ENUM_GUI_COMBO_DATA |
prop_Value | The value of the specified property |
Return value
Returns true if the specified ComboBox data has been returned. Otherwise, returns false. In order to get an error, call GetLastError() function.
Sample
Public Sub main() ''''TODO: Script program start method dim frmID,CData frmId = "6500" CreateVTLForm CLng(frmId),true CreateVTLControl CSTR(frmId) , "cmbA" , GUI_COMBO_BOX 'set Form GUI properties SetGUIObject CSTR(frmId),"",GUI_PROPERTY_HEIGHT, 2000 SetGUIObject CSTR(frmId),"",GUI_PROPERTY_WIDTH, 6000 SetComboBoxData CSTR(frmId),CSTR("cmbA"),COMBO_ADD_ITEM,"ComboBox Item 1" SetComboBoxData CSTR(frmId),CSTR("cmbA"),COMBO_ADD_ITEM,"ComboBox Item 2" GetComboBoxData CSTR(frmId),CSTR("cmbA"),COMBO_COUNT,CData AlertMessage "Combo Box Count = " & CSTR(CData) CData = FindItemInComboBox (CSTR(frmId),CSTR("cmbA"),CINT(1),CSTR("ComboBox Item 1")) AlertMessage "Find Item In Combo Box - ComboBox Item 1 : " & CData End Sub
See Also