Menu items in toolbar appear in reverse order.

Hello, I do some modification on the menu toolbar menu items.

In python code i set the menu items like this A, B, C, …
But when in the Blender menu they appear like this …, C, B, A

Is this a convention or there is a switch somewhere?

It depends on the direction the menu is opened. If you open a menu in the 3D View, there is likely not enough space below to open it below, so its direction is up instead. The closest entry to the mouse will always be “Properties” however. This is handled in the C code.

I see, by flipping the bar on top/bottom this seems to reverse the menu.

Strange convention in my opinion but anyway.

Thanks for answering.