找回密码
 立即注册

QQ登录

只需一步,快速开始

wenchaojian

银牌会员

6

主题

9

帖子

3198

积分

银牌会员

积分
3198

活字格认证

wenchaojian
银牌会员   /  发表于:2013-3-15 17:02  /   查看:4720  /  回复:1
先前咨询了用图片作为按钮,可以了,现在还有一个小问题想问一下,就是如果鼠标移到上面,有提示文,.net自带的控件中的tooltip的功能。

1 个回复

倒序浏览
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2013-3-15 17:51:00
沙发
  1.         protected void Page_Load(object sender, EventArgs e)
  2.         {
  3.             if (!IsPostBack)
  4.             {
  5.                 CButtonCellType bct = new CButtonCellType();
  6.                 bct.ShowEllipsis = true;
  7.                 bct.ButtonType = FarPoint.Web.Spread.ButtonType.ImageButton;
  8.                 FpSpread1.ActiveSheetView.Columns[0].CellType = bct;
  9.             }
  10.         }

  11.         [Serializable]
  12.         public class CButtonCellType : FarPoint.Web.Spread.ButtonCellType
  13.         {
  14.             public override Control PaintCell(string id, TableCell parent, FarPoint.Web.Spread.Appearance style, FarPoint.Web.Spread.Inset margin, object value, bool upperLevel)
  15.             {
  16.                 System.Web.UI.WebControls.ImageButton ctl = base.PaintCell(id, parent, style, margin, value, upperLevel) as System.Web.UI.WebControls.ImageButton;
  17.                 ctl.Attributes.Add("title","Test");
  18.                 return ctl;
  19.             }
  20.         }
复制代码
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部