问题
I need to know how to set the order of elements shown in EA's project browser programmatically (in order to mimic the green arrows).
回答1:
The tree view can not be sorted freely. EA puts a couple of constraints on the sorting. So diagrams, packages and a couple of other elements appear always on top and in groups. This is hard coded.
Use Element.TreePos
to change the order where appropriate to simulate a manual order.
FWIW: Features have another queer behavior sometimes. You might need to uncheck the following in Tools/Options:
来源:https://stackoverflow.com/questions/43133835/sort-project-browser-tree-view-programmatically