Lazarus 1.8.4 - Free Pascal 3.0.4
......
Clicking Black Off all triangles disapear, in case there are one black on one column and one green in the other, both of them disapear.
OK, that seems to be the key difference then. In my case, that Black Off button turns only the Black one off. So, wonder if its the version of Lazarus ? I have tested both 2.0.0 and 2.0.7 and in both of them the "Black Off" button only turns off the black triangle (the triangle from the imagelist).
Just to be clear, what I want to do is move the triangle (either green or black but not both!) from one column to the other. And turn it on for a grid that the user has not yet clicked the heading in.
Its seems those green triangles have been there for some time, Juha and WP mention them here
https://forum.lazarus.freepascal.org/index.php/topic,36664.msg244630.html#msg244630WP mentions "icons cannot be changed" but Juha says they can but he cannot remember. I assume he is refering to your trick.
I followed your link to google drive but the video there has same problem, I assume I don't have the right codec installed, It downloads and plays but is unintelligible. I downloaded and compiled (2.0.7) the project there. It shows me the green triangles when I click the grid headers and the black ones if I click button1. Button1 reverses the sort direction but does not alter the column being sorted (and its not intended to).
With another couple of buttons and a bit of code I can turn off the black triangles easily,
but I cannot turn off the green ones, I cannot for example, turn off the green one in column 0 and turn it on in column 1. Once the user has clicked a column header, the green triangle appears (even if the black one is already there) and it cannot be removed.
Maybe I need to go back to 1.8.4 and see if that works for me as expected ? "Something" has gone wrong since then !
GAN, I really appreciate the effort you are putting in here, thanks !
Davo
Davo