API version 1

- ‐

R

CRS::Common::UI::IconView

owner

自身のアイテムが属しているIconViewオブジェクトを示します。

IconViewItem オブジェクトは常に何らかのIconViewオブジェクトに所属しています。 この所属先のIconViewオブジェクトを返します。

関連項目

IconViewクラス



使用例 CRSダウンロード ダウンロード(IconView_icon11.png) ダウンロード(IconView_icon12.png)

Form IconViewItem_owner {
   x = 0;
   y = 0;
   width = 800;
   height = 600;

   IconView iconView1 {
           x = 8;
           y = 8;
           width = 240;
           height = 480;

           IconViewItem items[2] {
                   var ic1 = new Image();
                   ic1.loadImage("IconView_icon11.png");

                   this[0].icon = ic1;
                   this[0].title = "foo1";

                   var ic2 = new Image();
                   ic2.loadImage("IconView_icon12.png");
                   this[1].icon = ic2;
                   this[1].title = "foo2";

                   function onTouch(e) {
                           #e.from のIconViewItemの親のIconViewを取得しnameを表示します
                           print(e.from.owner.name ,"のアイテム ",e.from.title,"が選択されました");
                   }
           };
   }

   IconView iconView2 {
           x = 264;
           y = 8;
           width = 240;
           height = 480;

           IconViewItem items[2] {
                   var ic1 = new Image();
                   ic1.loadImage("IconView_icon11.png");

                   this[0].icon = ic1;
                   this[0].title = "foo1";

                   var ic2 = new Image();
                   ic2.loadImage("IconView_icon12.png");
                   this[1].icon = ic2;
                   this[1].title = "foo2";

                   function onTouch(e) {
                           #e.from のIconViewItemの親のIconViewを取得しnameを表示します
                           print(e.from.owner.name ,"のアイテム ",e.from.title,"が選択されました");
                   }
           };
   }
}