함께 작업 Group Shapes 워드 문서

Contents
[ ]

때때로 당신은 추가 할 필요가 group shape 단어 문서로 그런 group shape 여러 모양으로 구성됩니다.

그 안에 Microsoft Word,당신은 신속하게 추가 할 수 있습니다 group shape 그룹 명령/버튼 사용. 그룹의 개별 모양은 별도로 이동할 수 있습니다.

그 안에 Aspose.Words 그것은 추가하는 것은 매우 쉽습니다 group shape 를 사용하여 GroupShape 수업 모양은 별도로 만들어집니다. Shape 다음 클래스에 추가 GroupShape 개체를 사용하여 AppendChild 방법

다음 코드 예제에서는 다음을 추가하는 방법을 보여 줍니다 group shape 단어 문서로:

For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-C
// The path to the documents directory.
System::String outputDataDir = GetOutputDataDir_WorkingWithDocument();
System::SharedPtr<Document> doc = System::MakeObject<Document>();
doc->EnsureMinimum();
System::SharedPtr<GroupShape> gs = System::MakeObject<GroupShape>(doc);
System::SharedPtr<Shape> shape = System::MakeObject<Shape>(doc, ShapeType::AccentBorderCallout1);
shape->set_Width(100);
shape->set_Height(100);
gs->AppendChild(shape);
System::SharedPtr<Shape> shape1 = System::MakeObject<Shape>(doc, ShapeType::ActionButtonBeginning);
shape1->set_Left(100);
shape1->set_Width(100);
shape1->set_Height(200);
gs->AppendChild(shape1);
gs->set_Width(200);
gs->set_Height(200);
gs->set_CoordSize(System::Drawing::Size(200, 200));
System::SharedPtr<DocumentBuilder> builder = System::MakeObject<DocumentBuilder>(doc);
builder->InsertNode(gs);
System::String outputPath = outputDataDir + u"AddGroupShapeToDocument.doc";
// Save the document to disk.
doc->Save(outputPath);