![]() |
Android ListView Image Click
Liste der Anhänge anzeigen (Anzahl: 1)
How can I change the image when I click on the created DynamicAppearance -> Item -> TImageObjectApperance.
I would like to add two buttons and I will also need to capture the event so that clicks return the name of the component to which the ListView clicks and id values are clicked? Thank you
Delphi-Quellcode:
procedure TfrmMain.ListView1ItemClick(const Sender: TObject; const AItem: TListViewItem); begin lvItem := AItem; end; procedure TfrmMain.ListView1ItemClickEx(const Sender: TObject; ItemIndex: Integer; const LocalClickPos: TPointF; const ItemObject: TListItemDrawable); var str: string; ch: boolean; begin if (LocalClickPos.X > (ListView1.Width - 50)) and (LocalClickPos.Y > 150) then begin str := lvItem.Detail; if lvItem.Objects.FindObjectT<TListItemImage>('imgMini').Bitmap = imageNo.Bitmap then begin lvItem.Objects.FindObjectT<TListItemImage>('imgMini').Bitmap := imageYes.Bitmap; ch := True; end else begin lvItem.Objects.FindObjectT<TListItemImage>('imgMini').Bitmap := imageNo.Bitmap; ch := False; end; end; if ch = False then begin Query1.ExecSQL('UPDATE select_table SET isChecked = 0, id_value = '+QuotedStr(str)+';'); end else begin Query1.ExecSQL('UPDATE select_table SET isChecked = 1, id_value = '+QuotedStr(str)+';'); end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:46 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz