Add Child to description popup field.



  • Hello. I am creating a parameter description with a popup field but I can not add childs to it. I know that in a GeDialog it is very straightforward AddChild(pop_up_ID,id,name).
    Also I managed to add child to a CycleButton CustomGui and I thought it would be very similar to this.

    BaseContainer bc = GetCustomDataTypeDefault(DTYPE_LONG);
    
    bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_CYCLEBUTTON);
    bc.SetString(DESC_NAME, "Cycle Button");
    bc.SetContainer(DESC_CYCLE, settings);
    return dc->SetParameter(DescLevel(id, DTYPE_LONG, 0), bc, group_id);
    

    where settings is the container that contains the item names for the cycle.
    What would be the equivalent of this for a popup field?
    I have tried some options but none of it worked. Also DESC_CYCLE would not work for the items of an popup field.

    BaseContainer bc = GetCustomDataTypeDefault(DTYPE_POPUP);
    
    bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_POPUP);
    //bc.SetString(DESC_NAME, "Pop Up Button");
    //bc.SetContainer(DESC_CYCLE, settings);
    return dc->SetParameter(DescLevel(id, DTYPE_POPUP, 0), bc, group_id);
    

    Thank you.



  • I found the solution. Seems that I had to use MSG_DESCRIPTION_POPUP message to fill the popup field.



  • hello,

    Are you creating your own custom parameter of using an existing one ?

    Cheers
    Manuel



  • Hello. I am creating my own custom parameter.



  • hello,

    So yes, you have to react to MSG_DESCRIPTION_POPUP, you can see an example on the nodedata manual

    I thought first you wanted to create a popup menu.

    Cheers,
    Manuel


Log in to reply