ADVGrid CanShowFixedDropdown visible vs. real column coding issue

In AdvGrid.pas (8.5.5.1,Jul,2020) CanShowFixedDropdown(c) ,line 55902 is called with the visible column index, whereby in line 42072, 35797, 35776 it is called with the real index from RemapCol(c).
This results in strange behaviour when assigning functions to the callbacks OnFixedDropdownClick and OnCanShowFixedDropDown, when using it together with column hiding.
So when the OnCanShowFixedDropDown is called before the OnFixedDropdownClick, the ACol holds the visible column index, but when you hover the mouse over the cell, and the code checks for the OnCanShowFixedDropDown, ACol holds the real column index.
I can change the code myself, but I don't know what should be the standard behaviour by design...
It is for sure a bad idea, if the same callback function is called with different versions of the same parameter.
Is there actually a description of the callback functions, to know, which of them use the visible ARow and ACol indexes, and which are using the real indexes..??

best regards
Thomas

The logic is:

  • events where it is expected cell data is needed, the real column index is returned, so the parameter ACol can be used directly in for example grid.Cells[ACol,ARow]
  • events where it is expected painting on the cell rectangle is needed, the display column index is returned

We can't just change the meaning of a parameter now as it would break all applications users built so far using this event.

Dear Bruno,
Thanks for your statement.
And it is absolutely clear, that at this point you cannot change any of the callback functions behaviour, because it will mess up everything.
Just the one (CanShowFixedDropdown) is actually violating the idea of a consistent feedback behaviour, because the same callback does not always return the same kind of ACol.
This is exactly why I created this topic. It sometimes returns the visible but also returns the real column index. It depends from where in your code it is called. In the mouse move section, it returns real column indexes, but in the mouse down / click stuffs, it returns the visible index.
See my first posts code lines..
The user actually don't know from where it is called, so it is useless when hidden columns are in the game....
Maybe my first post was not clear enough to pinpoint the issue.
Thank you

Thanks for this additional information.
You're correct about this case. We have now adapted this to always consistently return the visual column index for this event. This fix will be included in the next update.