Solved Align Group Parameters (Resource Files)

Hello,
I have a resource file where I define the UI of materials attributes.

GROUP COATING_LAYER
{
     GROUP THICKNESS_GROUP
     {
	COLUMNS 2;
	REAL COATING_LAYER_THICKNESS{SCALE_H; MIN 0; MAX 1; MINSLIDER 0; 
        MAXSLIDER 1; STEP 0.001; CUSTOMGUI REALSLIDER;}
	SHADERLINK COATING_LAYER_THICKNESS_SHADER{ANIM ON; SCALE_H; HIDDEN;}
     }

     GROUP COLOR_GROUP
     {
	COLUMNS 2;
	COLOR COATING_LAYER_COLOR{SCALE_H;}
	SHADERLINK COATING_LAYER_COLOR_SHADER{ANIM ON; HIDDEN;}
     }
//...Continues with other groups
}

One parameter of the group I specify on the res file as above (The hidden one is not used at all in the UI) and the second parameter I specify using Description object as below.

const DescID* singleid = dc->GetSingleDescID();

	if (!singleid || ((DescID)id).IsPartOf(*singleid, NULL))
	{
		BaseContainer bc = GetCustomDataTypeDefault(DTYPE_POPUP);

		//  Set CycleButton properties
		bc.SetBool(DESC_ANIMATE, false);
		bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_POPUP);
		bc.SetBool(DESC_GROUPSCALEV, TRUE);
		//  Create CycleButton
		return dc->SetParameter(DescLevel(id, DTYPE_POPUP, 0), bc, groupid);
	}

	return TRUE;

The view that I get is the picture below but as you can see the paramters (Thickness, Color, Roughness etc) are not aligned as they normally do when using description resource.
How would the code or res file look like so I can have them aligned.
00071653-cd8e-4496-b5eb-d2e57c20caad-image.png

Hi,

unless I am missing something here, I would say that this behaviour has nothing to do with modifying your description via GetDDescription() but the structure of your res file. The alignment of description elements always works per GROUP. So when you encapsulate every row in a GROUP you will have no alignment at all.

There are several ways you can tackle this. Here is a recent posting that dealt with a similar problem.

Cheers
zipit

MAXON SDK Specialist
developers.maxon.net

Hi,

unless I am missing something here, I would say that this behaviour has nothing to do with modifying your description via GetDDescription() but the structure of your res file. The alignment of description elements always works per GROUP. So when you encapsulate every row in a GROUP you will have no alignment at all.

There are several ways you can tackle this. Here is a recent posting that dealt with a similar problem.

Cheers
zipit

MAXON SDK Specialist
developers.maxon.net

@zipit the reason why I have to use GROUP for every row is because at every row I am adding a popup button. And I can not add it using res file. So I can't do this without a group which tells me where to add the popup button.

Thanks @zipit,
Managed to solve it thanks to you.