Jump to content

UnimList


picyka

Recommended Posts

Em 18/6/2022 às 12:03, Picyka disse:

Eu fiz assim.

Self.UnimListAnswer.Items.AddObject('<i class="fas fas-circle"></i> ' + lOpcao.Description, lOpcao);

Você pode desconsiderar o post

Is there a possibility, when selecting an item, I can change the icon?

Link to comment
Share on other sites

procedure TUnimFormPesquisa.ConfigureSelected(Index: Integer);
begin
  var lIndexSel := -1;
  for var I := 0 to Self.UnimListResposta.Count - 1 do
  begin
    if I = Index then
    begin
      Self.UnimListResposta.Items[I] := '<i class="fas fa-check-circle"></i> ' + Copy(Self.UnimListResposta.Items[I],Pos('>',Self.UnimListResposta.Items[I])+1,MaxInt);
      lIndexSel := I;
    end
    else
      Self.UnimListResposta.Items[I] := '<i class="far fa-circle"></i> ' + Copy(Self.UnimListResposta.Items[I],Pos('>',Self.UnimListResposta.Items[I])+1,MaxInt);
  end;

  Self.UnimListResposta.ItemIndex := lIndexSel;
end;

 

Link to comment
Share on other sites

×
×
  • Create New...