Here is a code snippet.
code:
$lblServiceType = $frmServiceDetail.Label()
$lblServiceType.Text = "Service Type"
$lblServiceType.Location = $iMargin, $lblStartName.Bottom + $iMargin
$lblServiceType.Size = $ilblMediumWidth, $iHeight
$cboServiceType = $frmServiceDetail.ComboBox()
$cboServiceType.Location = $lblServiceType.Right + $iMargin, $lblServiceType.Top
$cboServiceType.Size = $itxtLargeWidth, $iHeight
$cboServiceType.Enabled = 0
$cboServiceType.Style = 1
$Nul = $cboServiceType.AddItem("Own Process")
$Nul = $cboServiceType.AddItem("Share Process")
$Nul = $cboServiceType.AddItem("Interactive Process")
$Nul = $cboServiceType.AddItem("Kernel Driver")
$Nul = $cboServiceType.AddItem("File System Driver")
$Nul = $cboServiceType.AddItem("Adapter")
$Nul = $cboServiceType.AddItem("Recognizer Driver")
FOR $Index = 0 TO $cboServiceType.ListCount - 1
$cboServiceType.ListIndex = $Index
IF $cboServiceType.Value = $objService.ServiceType
$Index = $cboServiceType.ListCount
ENDIF
NEXT
If I underestand the question, this is the part that will hopefully help. I use it to find the active value, but you could also use it for excluding aready entered values.
code:
FOR $Index = 0 TO $cboServiceType.ListCount - 1
$cboServiceType.ListIndex = $Index
IF $cboServiceType.Value = $objService.ServiceType
$Index = $cboServiceType.ListCount
ENDIF
NEXT
_________________________
Kelly