1

別のボタンをクリックするたびに、あるボタンの色を変更しようとしています。私の動作しないコードは以下のとおりです。これに適したドキュメントを見つけるのに苦労しました

     components: [
     {flex: 1, 
      kind: "Control", 
      layoutKind: "HFlexLayout",
      components: [
      {kind: "Button", caption: "X", onclick: "buttonClick", style: Xcolor},
      {name: "lIqI", kind: "Button", caption: "I", disabled: true, style: OFF},
      {kind: "Button", caption: "II", disabled: true, style: OFF},
      {kind: "Button", caption: "III", disabled: true, style: OFF},
      {kind: "Button", caption: "IV", disabled: true, style: OFF},
      {kind: "Button", caption: "V", disabled: true, style: OFF}
      ],
      buttonClick: function(inSender, inEvent) {
          lIqI.setStyle(ON);      
      }
      // ON & OFF are colors
4

1 に答える 1

2

ボタンを参照する場合は、次の構文を使用する必要があります。

 this.$.lIqI.setStyle(ON);
于 2012-01-05T21:00:31.413 に答える