找回密码
 立即注册

QQ登录

只需一步,快速开始

yaoxiaoqiang00
中级会员   /  发表于:2015-3-27 17:06  /   查看:4552  /  回复:1
鼠标移过单元格,如何设置悬浮提示信息?

1 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2015-3-27 17:53:00
沙发
回复 1楼yaoxiaoqiang00的帖子

可以通过 floating object 进行添加:

  1. public class MyFloatingObject : GrapeCity.Windows.SpreadSheet.UI.CustomFloatingObject
  2.         {
  3.             public MyFloatingObject(string name, double x, double y, double width, double height)
  4.                 : base(name, x, y, width, height)
  5.             {
  6.             }

  7.             public override FrameworkElement Content
  8.             {
  9.                 get
  10.                 {
  11.                     Border border = new Border();

  12.                     StackPanel sp = new StackPanel();
  13.                     sp.Children.Add(new Label() { Content = "Label" });
  14.                     sp.Children.Add(new Button() { Content = "Button" });

  15.                     border.BorderThickness = new Thickness(1);
  16.                     border.BorderBrush = new SolidColorBrush(Colors.Black);
  17.                     border.Child = sp;
  18.                     return border;
  19.                 }
  20.             }
  21.         }

  22. //add instance of this floating object into worksheet
  23. MyFloatingObject mf = new MyFloatingObject("mf1", 10, 10, 200, 100);
  24. gcSpreadSheet1.ActiveSheet.FloatingObjects.Add(mf);
复制代码
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部