...
以下代码创建了一个组合框,组合框将弹出一个下拉列表,
...
Code Block |
---|
...
Copy Code
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="308e7741-d092-4717-91d6-f4fe29e58e81"><ac:plain-text-body><![CDATA[
| ||||
var cellType2 = new GC.Spread.Sheets.CellTypes.ComboBox();cellType2.items(["a","b","c"]);activeSheet.getCell(2, 2).cellType(cellType2); |
...
...
]]></ac:plain-text-body></ac:structured-macro>
以下代码创建了一个可编辑的组合框,组合框将会弹出一个下拉列表。
...
JavaScript
...
Copy Code
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6a58a696-e032-4a1f-99c6-c39e49092943"><ac:plain-text-body><![CDATA[
...
以下代码创建了一个可编辑的组合框,组合框将会弹出一个下拉列表。
Code Block | ||||
---|---|---|---|---|
| ||||
var items2 = ["a", "ab", "abc", "apple", "boy", "cat", "dog"]; var eComboBoxCellType = new GC.Spread.Sheets.CellTypes.ComboBox().items(items2).editable(true); activeSheet.getCell(1, 3).cellType(eComboBoxCellType); activeSheet.setColumnWidth(3,120); |
...
...
]]></ac:plain-text-body></ac:structured-macro>
另见
Using Rapid Input Mode
Using Edit Mode Always
ComboBox class