Sorry, my English is not very good. Maybe I can't describe my problem very well. I am currently learning to make a simple plug-in. I hope to select a point, click a button, and create a selection tag. This step has been completed, but I hope to automatically link to my linkbox when creating a tag (I have an "addcustomgui_linkbox").
thank!
Bool MatrixAlignDialog::CreateLayout()
{
SetTitle("Matrix Align"_s);
GroupBegin(0, BFV_SCALEFIT | BFH_SCALEFIT, 2, 0, "Select Object"_s, 0);
{
GroupBorderSpace(5, 5, 5, 5);
GroupBorder(BORDER_GROUP_IN);
AddStaticText(IDC_LINKBOX1_TEXT, BFH_RIGHT | BFH_FIT, 100, 20, "Object"_s, 0);
AddCustomGui(IDC_LINKBOX1, CUSTOMGUI_LINKBOX, String(), BFH_SCALEFIT, 250, 10, BaseContainer());
}
GroupEnd();
GroupBegin(0, BFV_SCALEFIT | BFH_SCALEFIT, 3, 0, "Set Start Group"_s, 0);
{
GroupBorderSpace(5, 5, 5, 5);
GroupBorder(BORDER_GROUP_IN);
AddButton(IDC_BUTTON1, BFH_SCALEFIT, 150, 20, "Set Point"_s);
AddStaticText(IDC_LINKBOX2_TEXT, BFH_RIGHT | BFH_FIT, 100, 20, "Start Group"_s, 0);
AddCustomGui(IDC_LINKBOX2, CUSTOMGUI_LINKBOX, String(), BFH_SCALEFIT, 250,10, BaseContainer());
}
GroupEnd();
GroupBegin(0, BFV_SCALEFIT | BFH_SCALEFIT, 3, 0, "Set End Group"_s, 0);
{
GroupBorderSpace(5, 5, 5, 5);
GroupBorder(BORDER_GROUP_IN);
AddButton(IDC_BUTTON2, BFH_SCALEFIT, 150, 20, "Set Point"_s);
AddStaticText(IDC_LINKBOX3_TEXT, BFH_RIGHT | BFH_FIT, 100, 20, "End Group"_s, 0);
AddCustomGui(IDC_LINKBOX3, CUSTOMGUI_LINKBOX, String(), BFH_SCALEFIT, 250, 10, BaseContainer());
}
GroupEnd();
GroupBegin(0, BFV_SCALEFIT | BFH_SCALEFIT, 3, 0, ""_s, 0);
{
GroupBorderSpace(5, 5, 5, 5);
GroupBorder(BORDER_GROUP_IN);
AddButton(IDC_BUTTON3, BFH_SCALEFIT, 150, 20, "Reset Pivot"_s);
}
GroupEnd();
return true;
}
Bool MatrixAlignDialog::Command(Int32 id, const BaseContainer& msg)
{
switch (id)
{
case IDC_BUTTON1:
{
// run the code for IDC_BUTTON1
const Int32 commandID = 12552;
if(IsCommandEnabled(commandID))
{
CallCommand(commandID);
}
break;
}
case IDC_BUTTON2:
{
// run the code for IDC_BUTTON2
const Int32 commandID = 12552;
if (IsCommandEnabled(commandID))
{
CallCommand(commandID);
}
break;
}
case IDC_LINKBOX2:
{
// get point selection tag
break;
}
default:
{
break;
}
}
return true;