API version 1

- ‐

R

string

eventName

イベント名を表します。

起動されるイベントハンドラはこの名前を元に選別されます。



使用例 CRSダウンロード

Form Eventusr {
   x = 0;
   y = 0;
   width = 800;
   height = 600;
   TextBox textbox1 {
           x = 104;
           y = 144;
           width = 168;
           height = 48;
   }
   /* 文字入力後にボタンクリック */
   Button button1 {
           x = 104;
           y = 216;
           width = 160;
           height = 48;
           Title = "ユーザー定義イベントを\r\n発生させる" ;

           function onTouch(e) {
                   var eventName ="UserEvent" ;
                   var userEvent1 =
                           new Event( eventName )  {
                                   String data ;
                           }
                   userEvent1.data.Value = ^.TextBox1.Value;
                   PostEvent(userEvent1) ;
           }
   }

   /* マウスONの後でクリック */
   function OnUserEvent(e) {
           //.MessageBox(e.data.Value) ;
           print(e.from) ;
           Chart chart1 {
                   x = 50;
                   y = 10;
                   width = 400;
                   height = 300;
                   title = "click me " ;
                   bgColor = "#ffffff" ;
                   opacity &= 0.6;
                   plotBgColor = new Brush("#ff000000", Brush.NOBRUSH);
                   function onMouseEnter(e) {
                           print(" on chart mouse ") ;
                           bgColor = "#00ff00" ;
                   }
                   function onClicked(e) {
                           print(" on click ") ;
                           bgColor = "#ff0000" ;
                   }
           }
   }
}