I have a button and a linkbox placed in the same row, however I found the button is always scaled horizontally when the linkbox is expanded.
Could you please help me find out how to stop the button being scaled horizontally?
I have tried applying DESC_SCALEH
to FALSE
and DESC_FITH
to TRUE
, but it doesn't work after the linkbox is expanded.
Before the linkbox is expanded, the button's width is expected.
After the linkbox is expanded, the button is scaled unexpected.
I essentially used the below code snippet to create the button and linkbox in NodeData::GetDDescription()
Int32 groupID = xxgroupIdxx;
const DescID groupDescID = CreateDescID(DescLevel(groupID, DTYPE_GROUP, 0));
{
BaseContainer bc = GetCustomDataTypeDefault(DTYPE_GROUP);
bc.SetInt32(DESC_COLUMNS, 2);
bc.SetInt32(DESC_SCALEH, TRUE);
description->SetParameter(groupDescID, bc, CreateDescID(DescLevel(AOV_COMP_PARAMS_GRP)));
}
{
DescID id = CreateDescID(DescLevel(xxButtonIdxx, DTYPE_BUTTON, 0));
BaseContainer bc = GetCustomDataTypeDefault(DTYPE_BUTTON);
bc.SetString(DESC_NAME, "test"_s);
bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_BUTTON);
bc.SetBool(DESC_SCALEH, FALSE); //// <<<<<<<<<<<
bc.SetBool(DESC_FITH, TRUE); //// <<<<<<<<<<<< I have tried using these two flags, but they don't help
description->SetParameter(id, bc, groupDescID);
}
{
const DescID id = CreateDescID(DescLevel(xxLinkIdxx, DTYPE_BASELISTLINK, 0));
BaseContainer bc = GetCustomDataTypeDefault(DTYPE_BASELISTLINK);
bc.SetString(DESC_NAME, "test"_s);
bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_LINKBOX);
bc.SetData(DESC_SCALEH, TRUE);
bc.SetContainer(DESC_ACCEPT, accept);
description->SetParameter(id, bc, groupDescID);
}
Thanks!