Problem with vertical label lazarus / 31-LCL ---------------------------------------------------------------------- madepabloh · 2011-08-14 22:36 I try to use a label component to show a text, but in vertical position. I change the font orientation value from 0 to 900, but text seems to disappear from the component. I tried to solve using not autosize, to change the alignment, font quality, and some other options without a good end. Any idea about what i am doing wrong to have a text on vertical position? Thanks! ---------------------------------------------------------------------- Blaazen · 2011-08-14 22:57 I just tried. I changed Autosize to False and I manually changed Height (and Width). But if someone will have different font, it may cause problem. If the font will be little bigger then it can be cutted. ---------------------------------------------------------------------- madepabloh · 2011-08-14 23:20 Thanks Blaazen, However, it does not work for me. I have it in Autozise:=False, and height and width in 300 for a caption text := 'Label' (i mean, enough big in size to show the text), and it is still empty... Edited: I think it is a problem of the coordinates of the component and the rotation... the coordinate origin of the label is located in the upper-left corner. So, when the text turns, at 90º, it is out of the rectangle  of the component. I don´t know if i explained it corrctly, but if you try with different values between 0 and 900, you will see what i mean. So, it seems to be a problem on the own component... ---------------------------------------------------------------------- Eclipticon · 2011-08-14 23:25 On a Windows system, I have tried the same as you, Blaazen. With increasingly big values for Orientation, one can see that the Text rotates to outside the manually defined box, no matter how big it is ... ---------------------------------------------------------------------- madepabloh · 2011-08-14 23:35 That is Eclipticon! Well explained!! ---------------------------------------------------------------------- typo · 2011-08-14 23:47 Try the BugTracker. ---------------------------------------------------------------------- madepabloh · 2011-08-14 23:58 OK Typo, I tried and someone else already writed about it few days ago: http://62.166.198.202/view.php?id=19471 So, it seems to be a bug and we should wait to future updates of lazarus. Cheers, ---------------------------------------------------------------------- Elmug · 2011-08-15 06:09 madepabloh, If I really had to have that, and nothing else worked, as discussed, I would simply use one label for each letter, and place the labels in a column. I think there are also ways to line or conform them one to each other, if necessary, and even group them. Then, I'd use a monospaced font. With this 'method' you could even have each letter have a different color and font variations! ---------------------------------------------------------------------- Scoops · 2011-08-15 07:01 Try: Code: [Select]Label1.Caption:= 'V'+#10+'E'+#10+'R'+#10+'T'+#10+'I'+#10+'C'+#10+'A'+#10+'L'; Is That What you are trying to do ? ---------------------------------------------------------------------- Elmug · 2011-08-15 11:35 Quote from: madepabloh on August 15, 2011, 12:36:03 amI try to use a label component to show a text, but in vertical position. I change the font orientation value from 0 to 900, but text seems to disappear from the component. I tried to solve using not autosize, to change the alignment, font quality, and some other options without a good end. Any idea about what i am doing wrong to have a text on vertical position? Thanks! madepabloh, You can also go to the TLabel's property Caption, Click on the [...] and enter your legend when the editing window opens. Then, each letter you terminate it with the Enter key, and the label will show the letters typed in a column. ---------------------------------------------------------------------- Arbee · 2011-08-15 15:30 The only one that comes close is by using a TStaticText (with Center or Right Alignment) and then rotate the text the other way around.  so -900. It does mean of course you have to accept the fact that the text runs from top to bottom. ---------------------------------------------------------------------- Blaazen · 2011-08-15 15:53 I cannot rotate TStaticText on Linux+Qt4. ---------------------------------------------------------------------- madepabloh · 2011-08-16 07:20 Thanks for your ideas! I do not want a text on a colum, but a rotated word. However, i will try this solution on the mean time. Thanks so much! ---------------------------------------------------------------------- Arbee · 2011-08-16 07:50 @Blaazen Indeed looks like it works on Windows only.  Just tried it on my Mac and that doesn't work either. ---------------------------------------------------------------------- felipemdc · 2011-08-16 08:49 Why not just draw the label in the OnPaint event of the window? procedure TMyForm.OnPaint(...); begin   Canvas.Font.Orientation := 900;   Canvas.TextOut(some parameters here); end; TLabel was not designed to support the orientation change, but then, the standard components are only that: standard. People can easily achieve any custom behavior with the OnPaint event or with a custom drawn component.