29-01-2018, 06:08 PM
وعليكم السلام ورحمة الله
yourlist: tlist<tpair<string,string>>;
pair:tpair<string,string>;
yourlist:= tlist<tpair<string,string>>.create;
اذا كنت تستخدم التعابير القياسية في الفلترة
عرف متغير
machcollection :tmachcollection
match : tmatch
يكون الكود هكذا
machcollection:=tregex(textofstrings,yourpaternhier,[ignorecase or single or multiline]);
for match in machcollection
begin
pair.value:=tmatch.group[1].value اسم السورة;
pair.key:=tmatch.group[2].value رابطها;
yourlist.add(pair);
end;
ثم ترسل الاسماء الى الكومبوبكس
for i=1 to yourlist.count do
begin
combobox1.items.add(yourlist[combobox1.item.index].value);
end;
اما اذا اردت جلب الرابط فغير
.value
ب
.key
الكود ربما غير مرتب كتبته على النود باد مباشرة
yourlist: tlist<tpair<string,string>>;
pair:tpair<string,string>;
yourlist:= tlist<tpair<string,string>>.create;
اذا كنت تستخدم التعابير القياسية في الفلترة
عرف متغير
machcollection :tmachcollection
match : tmatch
يكون الكود هكذا
machcollection:=tregex(textofstrings,yourpaternhier,[ignorecase or single or multiline]);
for match in machcollection
begin
pair.value:=tmatch.group[1].value اسم السورة;
pair.key:=tmatch.group[2].value رابطها;
yourlist.add(pair);
end;
ثم ترسل الاسماء الى الكومبوبكس
for i=1 to yourlist.count do
begin
combobox1.items.add(yourlist[combobox1.item.index].value);
end;
اما اذا اردت جلب الرابط فغير
.value
ب
.key
الكود ربما غير مرتب كتبته على النود باد مباشرة

