5
You cannot rotate the component TLabel (as far as I have discovered), you can find components around that support this behavior, the Firemonkey is able to generate this effect!
However, it follows a procedure that can clarify your ideas and maybe get where you want!
Implement this in the OnPaint form!
var
lf: TLogFont;
tf: TFont;
begin
with Form1.Canvas do
begin
Font.Name := 'Arial';
Font.Size := 24;
tf := TFont.Create;
try
tf.Assign(Font);
GetObject(tf.Handle, SizeOf(lf), @lf);
lf.lfEscapement := 320;
lf.lfOrientation := 320;
SetBkMode(Handle, TRANSPARENT);
tf.Handle := CreateFontIndirect(lf);
Font.Assign(tf);
finally
tf.Free;
end;
TextOut(10, Height div 2, 'Texto Rotacionado aqui!');
end;
Take a look at the Firemonkey, you can find something that I can help even more!
If not solved, you can copy the String and generate an image in (TImage), rotate and position at the location of the TLabel.
Following question and answer of how to convert String to Image:
