التعامل مع listbox
#1
السلام عليكم

قمت بمتابعة الشرح هنا    [/url][url=https://www.experts-exchange.com/articles/10054/Implementing-a-ListView-in-Firemonkey.html]listbox

وكل شيء تمام  لكن عند الضغط على شريط التمرير scrollbar تختفي الصورة والبوتون   فأين الخلل بارك الله فيكم

هذا الكود المستعمل


كود :
Var   ListBoxItem: TListBoxItem;   ItemText: TText;   // if you get an error here, ensure that FMX.Objects is included in your uses above.   Itembtn: TSpeedButton;   ItemCircle: TCircle; begin   // First, we create an empty ListBoxItem with no parent   ListBoxItem := TListBoxItem.Create(self);   // now, we set a parent for this item   // ListBox1.BeginUpdate;   ListBoxItem.BeginUpdate;   ListBoxItem.Parent := ListBox1;   ListBoxItem.Height := 113;   ListBoxItem.Width := 336;   // Associate the Style you created with the ListBoxItem - not the ListBox itself.   ListBoxItem.StyleLookup := 'NewList';   // Next up, we're going to populate ItemText with the Caption of the Style using a style name lookup.   ItemText := ListBoxItem.FindStyleResource('TxtUser') as TText;   // We're going to set the text of the object to be whatever the caption should be.   if Assigned(ItemText) then     ItemText.Text := 'Hello World!';   Itembtn := ListBoxItem.FindStyleResource('BtnAddFriend') as TSpeedButton;   // We're going to set the text of the object to be whatever the caption should be.   if Assigned(Itembtn) then     Itembtn.Text := 'Hello World!';   Itembtn := ListBoxItem.FindStyleResource('BtnRemove') as TSpeedButton;   // We're going to set the text of the object to be whatever the caption should be.   if Assigned(Itembtn) then     Itembtn.Text := 'Hello World!';   ItemCircle := ListBoxItem.FindStyleResource('Img') as TCircle;   // We're going to set the text of the object to be whatever the caption should be.   if Assigned(ItemCircle) then     ItemCircle.Fill.Bitmap.Bitmap.LoadFromFile('E:\badger_1f9a1.png');   ListBoxItem.EndUpdate;   TabControl1.ActiveTab := TabUsers;

وهذه الصورة

[صورة: Untitled.png.e1a29ebc1b3c66adf8321fafeeb545e2.png]
الرد
#2

.rar   Project1.rar (الحجم : 56.78 ك ب / التحميلات : 30)
الرد


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


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