ich möchte ein Filter für eine ListView bauen, der über eine DropDownList gesetzt wird. Also zeig mir nur das was in Spalte 2 eine 1 stehen hat.
Da der Inhalt in Spalte 2 variable ist, war mein Gedanke die DropDownList mit Spalte 2 zu füllen nachdem die ListView gefüllt wurde. Gibt es eine Option für die DDL die ich setzten kann, sodass die DDL ohne Duplikate gefüllt wird? Ich konnte leider keine finden.
Code: Select all
; Generated by AutoGUI 1.3.3a
#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%
LV_Data=
(
Test;1;100;244
Produkt;1;100;238
Part;1;100;063
Product;1;100;357
Test;2;100;244
Produkt;2;100;238
Part;2;100;063
Product;2;100;357
)
Gui Add, DropDownList, x300 y5 w95, DropDownList||
Gui Add, ListView, x5 y31 w390 h150, Title|Cat|Desc|No
Loop, parse, LV_Data, `n
{
StringSplit, Array, A_LoopField, `;
LV_Add("", Array1, Array2, Array3, Array4)
}
LV_ModifyCol(1, 150), LV_ModifyCol(2, 50), LV_ModifyCol(3, 100), LV_ModifyCol(4, 65)
Gui Show, w400 h186, Window
Return
GuiEscape:
GuiClose:
ExitApp
; Do not edit above this line
Nmk