Registriert seit: 16. Feb 2006
444 Beiträge
Delphi 11 Alexandria
|
Re: Button mehrzeilig
10. Okt 2008, 19:57
Delphi-Quellcode:
// DrawText
memoryBitmap.Canvas.Brush.Style := bsClear;
if FState = bsDisabled then
begin
OffsetRect(TextBounds, 1, 1);
memoryBitmap.Canvas.Font.Color := clBtnHighlight;
DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), TextBounds,DT_CENTER or DT_VCENTER );
OffsetRect(TextBounds, -1, -1);
memoryBitmap.Canvas.Font.Color := clBtnShadow;
DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), TextBounds, DT_CENTER or DT_VCENTER );
end
else
DrawText(memoryBitmap.Canvas.Handle, PChar(Caption), Length(Caption), TextBounds, DT_CENTER or DT_VCENTER );
// Copy memoryBitmap to screen
canvas.CopyRect(ClientRect, memoryBitmap.canvas, ClientRect);
habe schon DT_WORDBREAK dazu gesteckt aber genau dann verschluckt er alles nach #13#10
Doreen Gruss Doreen
|
|
Zitat
|