Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can display a button in a cell using the button cell. You can also set appearance properties such as color and text.你可以在单元格中显示一个按钮,并修改该按钮的样式。



Using Code
This example creates a button cell and sets the cell backcolor.示例代码
以下代码在单元格中放置了一个按钮,并且将背景颜色设置为 #FFFF00。

JavaScript

Copy Code

var cellType = new GC.Spread.Sheets.CellTypes.Button();cellType.buttonBackColor("#FFFF00");cellType.text("this is a button");activeSheet.getCell(0, 2).cellType(cellType);

 

See Also另见
Button class