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; :
Comments
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;
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;
:
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 !