THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/02/2009 at 12:52, xxxxxxxx wrote:
Cinema 4D Version: 10.5
Language(s) : C.O.F.F.E.E ;
Is there a way to add an item to a group other than a radiobutton, say a textfield to a simple group? On runtime?
AddItem(id, subid, name) seems to be for selection fields only, is there a function for other types too?
On 18/02/2009 at 00:34, xxxxxxxx wrote:
AddItem() is only for radiobuttons, comboboxes, and popupbuttons. It adds selection elements to these.
If you want to 'dynamically' add gadgets to a dialog group, you set up a group with a unique id (just a unique number - not a plugin id) and call a function that flushes the group gadgets, adds the gadgets, and notifies of the change. To do this, use a function like this:
// Add gadgets
Normally, I call this type of function from CreateLayout() inside the AddGroupBeginX(id,...) and AddGroupEnd() as well as when it needs to be updated (from events in Message(), Commmand(), etc.).