DrawText en TCustomPanel
Utilizo el siguiente código para poner una caption en un tcustompanel
procedure DrawBevelText;
var i: integer;
begin
with Canvas do
begin
StrPCopy(C, Text);
CLen := StrLen(C);
R := Rect(20,20, y, 0, H);
DrawText(Canvas.Handle, C, CLen, R, DT_LEFT or DT_CALCRECT);
Brush.Style := bsClear;
DrawText(Canvas.Handle, C, CLen, R, DT_LEFT);
end;
end;
el caso es que le asigno un texto a la caption y luego otro distinto y lo que
me hace es pintarlo encima sobreescribieno el anterior. Aunque lo inicialice
a "vacío" antes de asignarle el texto me hace lo mismo
¿Alguien puede ayudarme?
Muchas gracias y un salduo
|