inverse the treeview

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

  • 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;
  • 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;
    :

  • hi;
    I have no trick for this problem now, But I try to solve it.


  • 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.

Howdy, Stranger!

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

Categories