Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TreeView's ScrollBar Not Accept VCL theme when mirroring

TTreeView's ScrollBar does not accept VCL themes when mirroring the Treeview by this code:

procedure SetWinControlBiDi(Control: TWinControl);
const
 WS_EX_NOINHERITLAYOUT = $00100000;
 WS_EX_LAYOUTRTL = $00400000;
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 TForm2.FormCreate(Sender: TObject);
begin
   SetWinControlBiDi(TreeView1);
end;

Sample image:

enter image description here

what should I do?

pls help me...

like image 884
smartiz Avatar asked Sep 01 '15 13:09

smartiz


1 Answers

This is an issue in the TScrollingStyleHook style hook, you should report this to Embarcadero. Meanwhile you can use the Vcl Styles Utils project to fix this.

Only you need follow the installation instructions and then add the Vcl.Styles.Hooks unit to your project.

enter image description here

like image 98
RRUZ Avatar answered Sep 27 '22 23:09

RRUZ