找回密码
 立即注册

QQ登录

只需一步,快速开始

jackeeyoung

初级会员

23

主题

55

帖子

355

积分

初级会员

积分
355

[已处理] 单选框的实现

jackeeyoung
初级会员   /  发表于:2016-1-14 09:07  /   查看:3979  /  回复:5
如何实现 单选框radio 的样式和功能

5 个回复

倒序浏览
gw0506
超级版主   /  发表于:2016-1-14 09:45:00
沙发
需要你这边自定义一个Radio。
  1. function MyCellType() {
  2. }
  3. MyCellType.prototype = new GcSpread.Sheets.CustomCellType();
  4. MyCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
  5.   //Paints a cell on the canvas.
  6. };
  7. MyCellType.prototype.createEditorElement = function() {
  8.    //Creates a DOM element then returns it.
  9. };
  10. MyCellType.prototype.getEditorValue = function(editorContext) {
  11.    //Gets the editor's value.
  12. };
  13. MyCellType.prototype.setEditorValue = function(editorContext, value) {
  14.    //Sets the editor's value.
  15. };
  16. MyCellType.prototype.activateEditor = function(editorContext, cellStyle, cellRect) {
  17.    //Activates the editor, including setting properties or attributes for the editor and binding events for the editor.
  18. };
  19. //... the other methods implements
  20. sheet.getColumn(1).cellType(new MyCellType());
复制代码
回复 使用道具 举报
jackeeyoung
初级会员   /  发表于:2016-1-14 11:04:00
板凳
能有一个可以运行的实例吗
回复 使用道具 举报
frank.zhang
社区贡献组   /  发表于:2016-1-14 17:51:00
地板
您好,

制作例子程序,需要一些时间,我们会尽快跟您反馈。
回复 使用道具 举报
jackeeyoung
初级会员   /  发表于:2016-1-15 08:25:00
5#
好的
回复 使用道具 举报
frank.zhang
社区贡献组   /  发表于:2016-1-15 09:23:00
6#
您好,


2016-01-15_092244.jpg (23.4 KB, 下载次数: 291)
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部