#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>
#include <GuiListView.au3>
Global $ListView1_[10]
Global $a[10]
Global $b[10]
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 449, 192, 114)
$ListView1 = GUICtrlCreateListView("1|2|3|4|5", 16, 24, 250, 200)
$ListView1_[0] = GUICtrlCreateListViewItem("11-22|333|333|333", $ListView1)
_GUICtrlListView_SetColumnWidth($ListView1, 0, 100)
$ListView1_[1] = GUICtrlCreateListViewItem("11-21|434|332|222", $ListView1)
$ListView1_[2] = GUICtrlCreateListViewItem("12-21|89|94|33|33", $ListView1)
$Combo1 = GUICtrlCreateCombo("", 350, 24, 100, 25, $CBS_DROPDOWNLIST)
$Combo2 = GUICtrlCreateCombo("", 480, 24, 100, 25, $CBS_DROPDOWNLIST)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Local $i
Local $j
Local $array_all_line
Local $array_head
Local $str1
Local $str2
For $i = 0 To 2
$array_all_line = StringSplit(GUICtrlRead($ListView1_[$i]), "|")
$array_head = StringSplit($array_all_line[1], "-")
$a[$i] = $array_head[1]
$b[$i] = $array_head[2]
Next
$str1 = $a[0]
For $i = 1 To 2
For $j = 0 To $i-1
If $a[$i]=$a[$j] Then
ExitLoop
EndIf
Next
If $j = $i Then $str1 &= "|" & $a[$i]
Next
GUICtrlSetData($Combo1, $str1)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Combo1
Local $combo_item = GUICtrlRead($Combo1)
GUICtrlSetData($Combo2, "")
$str2 = ""
For $i = 0 To 2
If $a[$i] = $combo_item Then
If $str2 = "" Then
$str2 &= $b[$i]
Else
$str2 &= "|" & $b[$i]
EndIf
EndIf
Next
GUICtrlSetData($Combo2, $str2)
EndSwitch
WEnd
|