大约有 9 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0027 秒)
...3,item4,item5"); comboBox.labelSize = 30; comboBox.itemSize = 25; comboBox.selectHandler = new Handler(this, onSelect, [comboBox]); Laya.stage.addChild(comboBox); return comboBox; } function onSelect(cb) { console.log("选中了: " + cb.selectedLabel); } })(); ```
来源: Laya2.0_文档 发布时间: 20210714
...3,item4,item5"); comboBox.labelSize = 30; comboBox.itemSize = 25; comboBox.selectHandler = new Handler(this, this.onSelect, [comboBox]); Laya.stage.addChild(comboBox); return comboBox; } private onSelect(cb: ComboBox): void { console.log("选中了: " + cb.selectedLabel); } } } new laya.UI_ComboBo...
来源: Laya2.0_文档 发布时间: 20210715
... comboBox.itemSize = 25; //下拉列表选择触发处理回调 comboBox.selectHandler = new Handler(this, onSelect, [comboBox]); //加载到舞台 Laya.stage.addChild(comboBox); //自动计算宽高 comboBox.autoSize = true; //设置位置 comboBox.pos((Laya.stage.width - comboBox.width) / 2, 150);...
来源: Laya2.0_文档 发布时间: 20210714
....stage.addChild(this.comp); //点击Tab选择按钮的处理 this.comp.tab.selectHandler = new Laya.Handler(this,onSelecte); } /**根据选择Tab的索引切换页面**/ function onSelecte(index){ //切换ViewStack子页面 this.comp.viewStack.selectedIndex=index; } ``` 运行示例代码,效果...
来源: Laya2.0_文档 发布时间: 20210714
....stage.addChild(this.comp); //点击Tab选择按钮的处理 this.comp.tab.selectHandler = new Laya.Handler(this,this.onSelecte); } /**根据选择tab的索引切换页面**/ private onSelecte(index:number):void{ //切换ViewStack子页面 this.comp.viewStack.selectedIndex=index; } } new ComponentDe...
来源: Laya2.0_文档 发布时间: 20210715
...示 Laya.stage.addChild(comp); //点击Tab选择按钮的处理 comp.tab.selectHandler=new Handler(this,onSelecte); } /**根据选择tab的索引切换页面**/ private function onSelecte(index:int):void { //切换ViewStack子页面 comp.viewStack.selectedIndex=index; } } } ``` 运行示例代码,...
来源: Laya2.0_文档 发布时间: 20210715
...隐藏滚动条 list.vScrollBarSkin = ""; list.selectEnable = true; list.selectHandler = new Handler(this, onSelect); list.renderHandler = new Handler(this, updateItem); Laya.stage.addChild(list); // 设置数据项为对应图片的路径 var data = []; for (var i = 0; i < 10; ++i) { data.push("res...
来源: Laya2.0_文档 发布时间: 20210714
...隐藏滚动条 list.vScrollBarSkin = ""; list.selectEnable = true; list.selectHandler = new Handler(this, this.onSelect); list.renderHandler = new Handler(this, this.updateItem); Laya.stage.addChild(list); // 设置数据项为对应图片的路径 var data: Array = []; for (var i: number = 0; i < ...
来源: Laya2.0_文档 发布时间: 20210715
...以选择 list.selectEnable = true; //选择单元格时回调方法 list.selectHandler = new Handler(this, onSelect); //渲染单元格时的回调方法 list.renderHandler = new Handler(this, updateItem); //为列表赋值 list.array = data; //加载到舞台 Laya.stage.addChild(list); } /***渲...
来源: Laya2.0_文档 发布时间: 20210715