inverse the treeview - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

inverse the treeview

faimofaimo Posts: 5Member
hi folks i want the way to inverse the treeview canvase i mean :
instead of
+ xxxx
+ 11232
+ hjhjas

i want to have :
xxx+
11232+
hjhas+


so the minus and plus signs will be in right side of the treeview componant
thank you

Comments

  • khorsandikhorsandi Posts: 11Member
    you can use this code:


    const
    WS_EX_NOINHERITLAYOUT = $00100000; // Disable inheritence of mirroring by children
    WS_EX_LAYOUTRTL = $00400000; // Right to left mirroring

    procedure SetWinControlBiDi(Control: TWinControl);
    var
    ExStyle: Longint;
    begin
    ExStyle := GetWindowLong(Control.Handle, GWL_EXSTYLE);
    SetWindowLong(Control.Handle, GWL_EXSTYLE, ExStyle or WS_EX_RTLREADING or WS_EX_RIGHT
    or WS_EX_LAYOUTRTL or WS_EX_NOINHERITLAYOUT );
    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    SetWinControlBiDi(TreeView2);
    end;
  • faimofaimo Posts: 5Member
    thank you fir replay , but whene i executed your code , no tooltip is shown or hints , so how could i resolve this big problem

    many thanks


    : you can use this code:
    :
    :
    : const
    : WS_EX_NOINHERITLAYOUT = $00100000; // Disable inheritence of mirroring by children
    : WS_EX_LAYOUTRTL = $00400000; // Right to left mirroring
    :
    : procedure SetWinControlBiDi(Control: TWinControl);
    : var
    : ExStyle: Longint;
    : begin
    : ExStyle := GetWindowLong(Control.Handle, GWL_EXSTYLE);
    : SetWindowLong(Control.Handle, GWL_EXSTYLE, ExStyle or WS_EX_RTLREADING or WS_EX_RIGHT
    : or WS_EX_LAYOUTRTL or WS_EX_NOINHERITLAYOUT );
    : end;
    :
    : procedure TForm1.FormCreate(Sender: TObject);
    : begin
    : SetWinControlBiDi(TreeView2);
    : end;
    :

  • khorsandikhorsandi Posts: 11Member
    hi;
    I have no trick for this problem now, But I try to solve it.


  • ERasekhERasekh IranPosts: 1Member

    hi Mr Khorsandi
    I read this article .
    but I want to show hint for each node !
    when I make RTL TreeView , no hint would show !

Sign In or Register to comment.