[]
表单区域
代码示例
//创建描述单击表单中哪个区域的日志
// 使用浏览器查看控制台日志
activeSheet.bind(GC.Spread.Sheets.Events.CellClick, function (sender, args) {
if(args.sheetArea === GC.Spread.Sheets.SheetArea.colHeader){
console.log("The column header was clicked.");
}
if(args.sheetArea === GC.Spread.Sheets.SheetArea.rowHeader){
console.log("The row header was clicked.");
}
if(args.sheetArea === GC.Spread.Sheets.SheetArea.corner){
console.log("The corner header was clicked.");
}
console.log("Clicked column index: " + args.col);
console.log("Clicked row index: " + args.row);
});
//绑定事件
activeSheet.bind(GC.Spread.Sheets.Events.CellDoubleClick, function (sender, args) {
if(args.sheetArea === GC.Spread.Sheets.SheetArea.colHeader){
console.log("The column header was double clicked.");
}
if(args.sheetArea === GC.Spread.Sheets.SheetArea.rowHeader){
console.log("The row header was double clicked.");
}
if(args.sheetArea === GC.Spread.Sheets.SheetArea.corner){
console.log("The corner header was double clicked.");
}
console.log("Double clicked column index: " + args.col);
console.log("Double clicked row index: " + args.row);
});
• colHeader = 1
列头
• corner = 0
表角
• rowHeader = 2
行头
• viewport = 3
视图区域