AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein GUI-Design mit VCL / FireMonkey / Common Controls Hintergrundfarbe eines selektierten FMX ListViewItems ändern
Thema durchsuchen
Ansicht
Themen-Optionen

Hintergrundfarbe eines selektierten FMX ListViewItems ändern

Ein Thema von TurboMagic · begonnen am 26. Jul 2018 · letzter Beitrag vom 2. Aug 2018
 
Benutzerbild von KodeZwerg
KodeZwerg

Registriert seit: 1. Feb 2018
3.691 Beiträge
 
Delphi 11 Alexandria
 
#2

AW: Hintergrundfarbe eines selektierten FMX ListViewItems ändern

  Alt 26. Jul 2018, 16:58
Zitat:
You have to use a style. So add a stylebook en either use one of the
styles that come with Delphi or right click the listview "edit custom
style"to make the style. dubbleclick on the stylebook to open the style
and modify the listviewstyle.
Hopes that helps
Me hope das auch

auch was mit Code auf SO entdeckt in Form einer Bitmap:
Zitat:
My suggestion is to add TListItemImage to listview, use it as a marker or set its bounds to cover whole item and use it as a backgraund. Then when you click on item, change the image assigned to the listitemimage object of the selected item.
for example:
Delphi-Quellcode:
procedure TForm1.lvListasItemClickEx(const Sender: TObject; ItemIndex: Integer;
  const LocalClickPos: TPointF; const ItemObject: TListItemDrawable);
begin
TListItemImage(TListViewItem(lvListasItem.Selected).Objects.FindDrawable('Image1')).Bitmap := Image1.MultiResBitmap.Items[1].Bitmap;
end;
Gruß vom KodeZwerg

Geändert von KodeZwerg (26. Jul 2018 um 17:02 Uhr)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:00 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