Tengo un TCheckListBox que lleno con ésta rutinita:
delphi
procedure TfrmContenedor.LlenaDocumentos(sConsPac: string); var iIndice : integer; begin with qryDocumentos do begin Close; SQL.Clear; SQL.Add('Select C42_Documento_STR, '+ 'case when C42_Documento_ID In (Select C42_Documento_ID from HY1_Documentos_Pac where (E2_Ctrl_Pac = '+sConsPac+')) then 1 else 0 end as Existe, '+ 'case when C42_Documento_ID In (Select C42_Documento_ID from HY11_DocumentosPacElec where (E2_Ctrl_Pac = '+sConsPac+')) then 1 else 0 end as Guardado '+ 'from C42_TSDocumentos;'); Open; if RecordCount > 0 then begin chklstDocumentos.Items.Clear; chklstDocumentos.Enabled := True; First; while NOT Eof do begin with chklstDocumentos do begin Items.Add(FieldValues['C42_Documento_STR']); iIndice := Items.Count -1; if FieldValues['Existe'] then Checked[iIndice] := True; end; Next; end; end; end; end;
Ahora, el problema es que cuando el valor del campo "Guardado" sea igual a 1, debo cambiar el color de éste ítem por cualquier otro que me apetezca..., ¿alguna idea? ¿Sugerencias?
Como siempre, agradecido de antemano.