On 15/09/2015 at 09:20, xxxxxxxx wrote:
Cinema 4D Version: R17
Platform: Mac OSX ;
Language(s) : C++ ;
I'd like to hide the "Delete Tag" button on one of my objects.
I think the code should be like this:
myObject->SetDescIDState(DescID(ID_TAGLIST, Tprotection, IDS_DELETE_TAG), DESCIDSTATE_HIDDEN);
I found IDS_DELETE_TAG inside c4d_strings.str, but I don't know how to include it in my project, if I have to, nor how to access it in a different way.
Does anybody know how to do this?
If you need more information, feel free to ask.
Thanks in advance for your help and time!
On 16/09/2015 at 05:19, xxxxxxxx wrote:
IDS_DELETE_TAG is the identifier of the label of the delete button, not its ID. Also, there is not only one delete tag button, but a delete button for each tag that is displayed with the object. It has to be this ways since every button deletes a different tag.
So to hide such a button you would have to construct the ID of that button. The ID is:
DescID tagid = DescID(DescLevel(ID_TAGLIST, DTYPE_GROUP, 0), DescLevel(tag->GetType(), DTYPE_GROUP, 0));
DescID buttonid = tagid + DescLevel(501, DTYPE_BUTTON, 0);
On 16/09/2015 at 07:53, xxxxxxxx wrote:
That works, thanks for your answer!!
You can mark this thread as solved.