Ver Mensaje Individual
  #4  
Antiguo 21-01-2014
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola FideRosado.

Código Delphi [-]
var
  BoldColumn : Integer = -1;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ListView1.OwnerDraw := false;
  ListView1.ViewStyle := vsReport;
end;

procedure TForm1.ListView1CustomDrawItem(Sender: TCustomListView;
  Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);
begin
  if (BoldColumn = 0) then
    with Sender.Canvas.Font do
      Style := Style + [fsBold];
end;

procedure TForm1.ListView1AdvancedCustomDrawSubItem(
  Sender: TCustomListView; Item: TListItem; SubItem: Integer;
  State: TCustomDrawState; Stage: TCustomDrawStage;
  var DefaultDraw: Boolean);
begin
  if (SubItem <> 0) and (SubItem = BoldColumn) then
   with Sender.Canvas.Font do
     Style := Style + [fsBold];
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  BoldColumn := StrToIntDef(Edit1.Text, -1);
  ListView1.Invalidate();
end;

Saludos
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita