I
I
Igor2019-09-04 15:17:10
Delphi
Igor, 2019-09-04 15:17:10

How to insert image into ListView using DynamicAppearance?

procedure TProjectManager.lvProjectsDblClick(Sender: TObject);
var
  enum: System.Generics.Collections.TEnumerator<TListViewItem>;
  Size: TSize;
begin
  if not Assigned(lvProjectItem) then
    exit;

//  enum := (Sender as TListView).Items.GetEnumerator;
//  while enum.MoveNext do
//  begin
//    enum.Current.Data['status'] := ''
//  end;

  lvProjectItem.Data['image_status'] := // Сюда хочу засунуть изображение


  CurrentProject := lvProjectItem.TagObject as TProject;

  INI.WriteInteger('CurrentProject', 'id', CurrentProject.id);
  INI.WriteString('CurrentProject', 'name', CurrentProject.name);
  INI.WriteString('CurrentProject', 'comment', CurrentProject.comment);
  INI.WriteString('CurrentProject', 'create_at', CurrentProject.create_at);
end;

5d6fab30a8419457952860.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2019-09-04
@IgorPI

Decision!

lvProjectItem.Data['image_status']:= TValue.From(ImageList.Bitmap(TSize.Create(32,32), 1));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question