- OpenLaszlo紹介
- プログラム構造関連
- スクリプト
- Javascript基礎
- 基礎知識
- ビュー<view>
- レイアウト
- 動かす
- 入力デバイス
- 文字
- 数値
- 日付
- オブジェクト指向
- 標準コンポーネント
- データの扱い
- データ操作(基礎)
- 応用編
–
チェックボックス<checkbox>の画像の大きさを指定する属性はありません。
でも<checkbox>のソースを覗くと画像の定義部分に cb と名前がついていました。これの幅と高さを変えてやると、大きさが変わりました。
※ただし正式なものではないので、バージョンが変わると動かないかもしれません。その場合、都度ソースを見て修正してください。
・・・自分専用のクラスを作ってしまえば後々便利でしょうね。
<?xml version="1.0" encoding="UTF-8"?> <canvas proxied="false" bgcolor="0xeeeeee"> <simplelayout spacing="5"/> <checkbox>標準のチェックボックス</checkbox> <checkbox>大きさを変えたチェックボックス <handler name="oninit"> this.cb.setAttribute('stretches',"both"); this.cb.setAttribute('width',10); this.cb.setAttribute('height',10); this._title.setAttribute('x',12); </handler> </checkbox> <checkbox>大きさを変えたチェックボックス <handler name="oninit"> this.cb.setAttribute('stretches',"both"); this.cb.setAttribute('width',20); this.cb.setAttribute('height',20); this._title.setAttribute('x',22); </handler> </checkbox> <checkbox>大きさを変えたチェックボックス <handler name="oninit"> this.cb.setAttribute('stretches',"both"); this.cb.setAttribute('width',30); this.cb.setAttribute('height',30); this._title.setAttribute('x',32); </handler> </checkbox> <checkbox>大きさを変えたチェックボックス <handler name="oninit"> this.cb.setAttribute('stretches',"both"); this.cb.setAttribute('width',40); this.cb.setAttribute('height',40); this._title.setAttribute('x',42); </handler> </checkbox> <checkbox>大きさを変えたチェックボックス <handler name="oninit"> this.cb.setAttribute('stretches',"both"); this.cb.setAttribute('width',50); this.cb.setAttribute('height',50); this._title.setAttribute('x',52); </handler> </checkbox> </canvas>