ダイアログの基本ウィンドウ クラスを作成しようとしています。コントロールを作成するために、_createChildControlImpl メソッドをオーバーライドし、getChildControl メソッドを使用することにしました。そして、チェックボックスを除いてすべてがうまく見えます。理由はわかりませんが、getChildControl メソッドを使用すると、チェックボックスが正しくレンダリングされません。
このコードは私の問題を再現します
qx.Class.define("MyWin",{
extend: qx.ui.window.Window,
construct: function(t){
this.base(arguments, t);
this.setLayout(new qx.ui.layout.Canvas());
var row = new qx.ui.container.Composite(new qx.ui.layout.HBox(5));
row.add(new qx.ui.basic.Label("Active:"));
row.add(this.getChildControl("active"));
row.add(new qx.ui.form.CheckBox("status B"));
var _mainContainer = new qx.ui.container.Composite(new qx.ui.layout.VBox(5));
_mainContainer.add(row);
this.add(_mainContainer, {width: "100%", bottom: 50, top:0});
},
members: {
_createChildControlImpl : function(id, hash){
var control;
switch(id){
case "active":
control=new qx.ui.form.CheckBox("status A");
break;
}
return control || this.base(arguments, id);
}
}
});
var win = new MyWin("Test");
this.getRoot().add(win, {left:20, top:20});
win.open();
遊び場へのリンクhttp://goo.gl/Lna8qc