1
"blocksPanel"및 "briquettesPanel"을 표시 또는 숨김으로 설정하는 방법에 대해 궁금합니다. 드롭 다운 목록에서 "8 : 1 Compressed Blocks"를 선택하고 드롭 다운 목록에서 "8 : 1 Compressed Briquettes"를 선택하면 "briquettesPanel"이 보이도록 "blocksPanel"을 표시하고 싶습니다.패널을 보이지 않게 보이게 설정하는 방법?
function doGet(e) {
var app = UiApp.createApplication();
//Create horizontal product + other panel
var productOtherPanel = app.createHorizontalPanel().setId('productOtherPanel')
.setStyleAttribute('position','relative').setStyleAttribute('left','0%');
//Create horizontal Product Panel
var productPanel = app.createHorizontalPanel().setId('productPanel').setStyleAttribute('position','relative')
.setStyleAttribute('left','0%').setVisible(true);
//Create listBox
var productList = app.createListBox().setName("productList").setId('productList');
//Add items to listBox
productList.addItem("8:1 Compressed Blocks");
productList.addItem("8:1 Compressed Briquettes");
//Create horizontal Compressed Blocks panel
var blocksPanel = app.createHorizontalPanel().setId('blocksPanel')
.setStyleAttribute('position','relative').setStyleAttribute('left','0%').setVisible(true);
//Create Compressed Blocks Size List
var blocksSizeList = app.createListBox().setName('blocksSizeList').setId('blocksSizeList');
//addItem fills the Compressed Blocks Size List
blocksSizeList.addItem("5kg");
blocksSizeList.addItem("20kg");
//Create horizontal Briquettes panel
var briquettesPanel = app.createHorizontalPanel().setId('briquettesPanel')
.setStyleAttribute('position','relative').setStyleAttribute('left','0%').setVisible(true);
//Create Briquettes Size List
var briquettesSizeList = app.createListBox().setName('briquettesSizeList').setId('briquettesSizeList');
//addItem fills the Briquettes Size List
briquettesSizeList.addItem("250g");
briquettesSizeList.addItem("650g");
app.add(productOtherPanel);
productOtherPanel.add(productPanel);
productPanel.add(productList);
productOtherPanel.add(blocksPanel);
blocksPanel.add(blocksSizeList);
productOtherPanel.add(briquettesPanel);
briquettesPanel.add(briquettesSizeList);
return app;
}
오 ... 정말 완벽합니다. Thx 너무 많은 Kalyan! – user1833055