[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 282
  • Last Modified:

inverse a treeview canvase

i want to developpe a new treeview  componant ( inherited from TTreeview ) so i want to be able to inverse the Treeview canvas with all its nodes and other things ( an RTL treeview )
right-to-left (RTL) layout for the tree :
for the first time i used this option to inverse the Original treeview : // the componant name  is Faimo

FSortType: TSortType;
procedure SetAbout(const Value: string);
procedure SetRightToLeftReading( b:Boolean);
property RightToLeftReading:Boolean read FRightToLeftReading write SetRightToLeftReading default false;
procedure Tfaimo.SetRightToLeftReading( b:Boolean);
oldParam: LongInt;
if FRightToLeftReading=b then
oldParam := GetWindowLong(handle, GWL_EXSTYLE);
SetWindowLong(handle, GWL_EXSTYLE, oldParam or $400000 or WS_EX_RIGHT);

but i made some problems in design Time when we move the control over the Form , and the tooltips no more appear .
could any one help me in :

01- be able to inverse the whole treeview from right to left
so instead of  
i would have
i appreciate all your help
  • 3
1 Solution
This component may already do what you need:


There is an example project included that does RTL reading.  It also supports unicode.  It is a very high quality component.  It is actually used in delphi 2005.  I am not sure if it can layout the nodes how you would like, but it may be a good starting point.  The control is built from the ground up, without using the windows API treeview.  The component is free and includes source code, so you should be able to modify it to suit your needs.  good luck.

frizeAuthor Commented:
thank you but all what i want is to developpe one by my self , above is the code that i use to developpe it , but what about the problems that i faced with this developped treeview

frizeAuthor Commented:
now i what to know how to align all the nodes ( and sub-nodes ) to the right side of this tree because i found how to redraw all the treeview but i 'm looking on how to align its nodes to the right side
frizeAuthor Commented:
please is there any reply

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now