Knowledgebase:
FindItemInComboBox
Posted by Mohammad Rahhal, Last modified by Rawan Al Hourani on 15 June 2016 12:41 PM

Syntax

Public Function FindItemInComboBox(formID As String, ComboName As String, indexStart As Integer, text As String) As Long

This function is used to return the index of an entered item starting from a specific index.

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.
indexStart The index to start search from, value of Type Integer
text The text to search for, value of type String.

Return value

Returns the index of the first occurrence of the entered text; if it is not existed, it returns (-1).

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
 

  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


Back to VTL Client Script Index

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions