2015-09-01 22 views
5

TTreeView's ScrollBar non accetta temi VCL quando il mirroring la TreeView di questo codice:del controllo TreeView non accetta VCL tema quando il mirroring

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; 

immagine del campione:

enter image description here

cosa devo fare?

pls mi aiutano ...

+1

Non so che cosa è esattamente sbagliato, ma funziona quando si include @ di RRUZ eccellente [Vcl.Styles.Hooks] (https://github.com/RRUZ/vcl-styles-utils/wiki/VclStylesHook) unit – whosrdaddy

+0

Nota aggiuntiva, se si imposta 'BiDiMode: = bdRightToLeft;' sul modulo la barra di scorrimento viene visualizzata correttamente ma la modalità RTL di treeview non viene visualizzata correttamente ... – whosrdaddy

+0

Grazie ... @whosrdaddy – smartiz

risposta

7

questo è un problema nel gancio TScrollingStyleHook stile, si dovrebbe riferire questo a Embarcadero. Nel frattempo puoi utilizzare il progetto Vcl Styles Utils per risolvere questo problema.

Solo è necessario seguire le istruzioni di installazione e quindi aggiungere l'unità Vcl.Styles.Hooks al progetto.

enter image description here

+0

Grazie amico. @RRuz – smartiz

Problemi correlati