add and extract item from listview in fmx
#5
استخدم الكود التالي

كود :
procedure TForm1.Button1Click(Sender: TObject); var lv: TListViewItem; IItem:TListItemImage; begin lv := ListView1.Items.Add; lv.Data['Name'] := 'Hello'; lv.Data['SubName'] := 'word'; lv.Data['Phone'] := '012456'; IItem:=lv.Objects.FindDrawable('img') as TListItemImage; if (IItem<>nil) then   IItem.ImageIndex:=0;   lv := ListView1.Items.Add; lv.Data['Name'] := 'Hello2'; lv.Data['SubName'] := 'word2'; lv.Data['Phone'] := '0124562'; IItem:=lv.Objects.FindDrawable('img') as TListItemImage; if (IItem<>nil) then   IItem.ImageIndex:=1; end; procedure TForm2.ListView1ItemClick(const Sender: TObject;   const AItem: TListViewItem); var   img: TBitmap;   Size: TSizeF; begin   Size := TSize.Create(64,64);   memo1.Lines.Add (AItem.Objects[0].Data.AsString+' : '+AItem.Objects[1].Data.AsString +' : '+AItem.Objects[2].Data.AsString);   ImageViewer1.Bitmap.Assign(Imagelist1.Bitmap(Size, AItem.Index )); end; end.


الملفات المرفقة
.png   Sans titre.png (الحجم : 33.39 ك ب / التحميلات : 10)
[-] كل من 1 user says قال شكرا ل Eagle Master على المشاركة المفيدة
  • invocker
الرد


الردود في هذا الموضوع
add and extract item from listview in fmx - بواسطة invocker - 25-07-2019, 08:37 PM
RE: add and extract item from listview in fmx - بواسطة merouane - 25-07-2019, 11:35 PM
RE: add and extract item from listview in fmx - بواسطة invocker - 26-07-2019, 06:55 AM
RE: add and extract item from listview in fmx - بواسطة invocker - 26-07-2019, 09:05 AM
RE: add and extract item from listview in fmx - بواسطة Eagle Master - 26-07-2019, 10:45 AM
RE: add and extract item from listview in fmx - بواسطة nadire1946 - 05-08-2019, 10:30 AM
RE: add and extract item from listview in fmx - بواسطة invocker - 26-07-2019, 04:15 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم