如何对齐网格中单元格中心的按钮?
var buttonGrid = app.createGrid(3,2).setId('buttonGrid');
buttonGrid.setStyleAttribute(row, column, attribute, value);
buttonGrid.setWidget(0,0,multiButton);
buttonGrid.setWidget(1,0,submitB);
答案 0 :(得分:0)
这有效:
var buttonGrid = app.createGrid(3,2).setId('buttonGrid');
buttonGrid.setStyleAttribute("text-align", "center");
buttonGrid.setWidget(0,0,multiButton);
buttonGrid.setWidget(1,0,submitB);
答案 1 :(得分:-1)
如果您只想将Button放在一列或一行中,您必须使用该对象的这些属性:
For Row:
grid.setRowStyleAttribute(row,"text-align", "center")
对于专栏:
grid.setColumnStyleAttribute(column,"text-align", "center")