Button scaled unexpectedly when it is in the same row with an expanded linkbox
-
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 applyingDESC_SCALEH
toFALSE
andDESC_FITH
toTRUE
, 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!
-
Hi @BruceC!
The expandable UIs like COSTOMGUI_LINKBOX are not designed to be used with other elements on the same row, hence can lead to the undefined behavior like what you're experiencing. I suppose the workaround for you would be to put the linkbox on the row below the button.
Cheers,
Ilia -
Thanks for the reply @i_mazlov. Yeah, I already tried the workaround, it worked.