TMSFNCTreeView1.OnGetNodeHorizontalTextAlign

hi, could someone help me, I'm trying to use the property OnGetNodeHorizontalTextAlign and when I use it, it reports the following problem for :

TMSFNCTreeView1.OnGetNodeHorizontalTextAlign(sender, ANode, 3, gtaTrailing);

[dcc32 Error] HeaderFooterTemplate.pas(298): E2197 Constant object cannot be passed as var parameter
[dcc32 Fatal Error] HeaderFooterApplication.dpr(6): F2063 Could not compile used unit 'HeaderFooterTemplate.pas'

The OnGetNodeHorizontalTextAlign is not a property or method, it is an event. Please implement the event instead of trying to call it. The event will be called automatically.

Thank you, how should I use it when it gives me an error? so how should I make the alignment from the program, for example, to the right?

At designtime, click on events, double-click on the OnGetNodeHorizontalTextAlign event, and set the parameters in the event implementation.

yes that's an event sorry i didn't notice thanks a lot for your help.

1 Like

No worries :)