Recent

Author Topic: Verticall Rotated Text  (Read 4723 times)

A

  • Guest
Verticall Rotated Text
« on: January 03, 2018, 11:00:49 pm »
Hello,

Is there any way to vertically rotate text like so (look at the vertical toolbar with the vertically oriented text in the toolbarbuttons):

https://ucarecdn.com/e1c116b8-715b-4920-9a8f-9c37e08c407b/

Unfortunately the closest I could get was learning how to programatically add a line to a caption; not much use xD.

Thanks for any tips.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Verticall Rotated Text
« Reply #1 on: January 03, 2018, 11:19:54 pm »
You only need to set Font.Orientation to 900 or 2700.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

A

  • Guest
Re: Verticall Rotated Text
« Reply #2 on: January 04, 2018, 12:13:53 am »
Thanks for the reply.

However, it didn't work. I even tried deleting the old toolbar and adding a new one in case I messed up any of the properties.

1. Added ToolBar
2. Add Button
3 In ToolBar properties, change value of 'Show Captions' to true (so that the caption on the button is displayed)
4. Click on the ToolBar, select 'Font' and change its sub-property of orientation to 900 [didn't work] and then to 2700 [didn't work]

If it makes any difference, I'm using GNU/Linux. Am I doing it right?

Cheers.



wp

  • Hero Member
  • *****
  • Posts: 13269
Re: Verticall Rotated Text
« Reply #3 on: January 04, 2018, 12:33:36 am »
I don't think that it is possible to rotate captions of a TToolbar...

What you show in your first post looks more like a TPageControl with rotated tabs (TabPosition = tpLeft).
« Last Edit: January 04, 2018, 01:07:58 am by wp »

A

  • Guest
Re: Verticall Rotated Text
« Reply #4 on: January 04, 2018, 12:41:40 am »
I don't think that it is possible to rotate a TToolbar...

What you show in your first post looks more like a TPageControl with rotated tabs (TabPosition = tpLeft).
Hey,

Okay, are you sure the control in the picture is a pagecontrol? I was thinking that it was just a button (because that's what it appears as), with this code:

[ON CLICK]

Code: Pascal  [Select][+][-]
  1. LeftSplitter.Visible := False; //With the SynEdit anchored to the left

If you think that it is a PageControl, what event should raise this?

Thanks. :)

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Verticall Rotated Text
« Reply #5 on: January 04, 2018, 12:50:37 am »
Both TTabControl and TPageControl can do it with TabPosition property set to tpLeft or tpRight - at least on Qt widgetset. AFAIR GTk2 can also have tabs on the left/right but they are horizontal.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

A

  • Guest
Re: Verticall Rotated Text
« Reply #6 on: January 04, 2018, 01:06:00 am »
Both TTabControl and TPageControl can do it with TabPosition property set to tpLeft or tpRight - at least on Qt widgetset. AFAIR GTk2 can also have tabs on the left/right but they are horizontal.
That could be my issue then, my tabcontrol reacts like GTk widget - it's horizontal when the tab position is tbLeft.

Thanks.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Verticall Rotated Text
« Reply #7 on: January 04, 2018, 01:14:17 am »
If you don't want to write your own component you can try TECTabCtrl from my EC-Controls. There it is implemented. It supports also multiline tabs and tab folding: http://wiki.lazarus.freepascal.org/TECTabCtrl
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

A

  • Guest
Re: Verticall Rotated Text
« Reply #8 on: January 04, 2018, 01:17:30 am »
That's exactly what I need - example 5.

Cheers for your help!

 

TinyPortal © 2005-2018