On 20/04/2018 at 02:40, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R19
Platform: Windows ;
Language(s) : C++ ;
---------
Hello,
I've looked into the documentation, but cannot seem to find details related to this topic.
I have a GeDialog which I populate dynamically with buttons. To know which button gets pressed by the user I use a base ID + index value.
Let's say button 1 has ID 1000, button 2 has ID 1000 + 1, etc ...
This way, in the GeDialog::Command I simply need to subtract 1000 from the incoming ID to know which button got pressed and react accordingly.
Additionally, the user can remove buttons. This would introduce gaps in the index, if I simply remove the button, so I would like to adjust the ID of the remaining buttons (after the one being removed) in order to avoid an index gap.
I thought of simply removing all buttons from the one being removed till the last one, and re-adding the buttons with re-indexed values.
But if it's possible to simply change the gadgets' IDs I'd be happier to do so.