![]() |
| サイトマップ | |
|
トップ | オブジェクト | プロパティ | メソッド | 定数 |
Group とは、グループ化された任意のオブジェクトのコレクションです。通常は、Format メニューの Group コマンドを使って作成します。グループ化されたオブジェクトは、単一のオブジェクトとして取り扱うことができます。AutoLegend オブジェクトは、Group オブジェクトのひとつです。Group オブジェクトには ObjectType プロパティが用意されており、その値は 12 または GPT_BAG になります。
Page GraphObjects Collection
|
プロパティ:Application , AutoLegend , Axes , ChildObjects , Color , Height , Left , Name , NameObject , ObjectType , OwnerGraphObject , Parent , Plots , StockScheme, Top , Width |
メソッド:GetAttribute, SelectObject, SetAttribute, SetObjectCurrent |
定数:Group (Bag) Attributes |
Group オブジェクトの属性や属性値を取得したり設定するには、多くの場合、GetAttribute メソッドと SetAttribute メソッドを使います。これらの属性を指定するには、Group (Bag) 属性の定数を使用します。
Dim SPPageItems, Index, Item Set SPPageItems = ActiveDocument.CurrentPageItem.GraphPages(0).ChildObjects Index = 0 For Each Item In SPPageItems If SPPageItems(Index).ObjectType = 12 Then MsgBox "Item " + CStr(Index+1) + ": Group of " + _ SPPageItems(Index).ChildObjects.Count + " objects",,"Number of Objects" Else MsgBox "Item " + CStr(Index+1) + ": Not a Group",,"Object Type" End If Index = Index + 1 Next
Dim SPBag Set SPBag = ActiveDocument.CurrentPageItem.GraphPages(0).ChildObjects(0) If SPBag.ObjectType = 12 Then MsgBox "Top: " + SPBag.Top/1000 + " in" + vbCrLf _ + "Left: " + SPBag.Left/1000 + " in" + vbCrLf _ + "Width: " + SPBag.Width/1000 + " in" + vbCrLf _ + "Height: " + SPBag.Height/1000 + " in",,"Grouped Object" End If