zoukankan      html  css  js  c++  java
  • ToolTipController 事件触发显示时 避免闪烁的处理方法

    private DevExpress.Utils.ToolTipController toolTipController1;
    private DevExpress.Utils.ToolTipController toolTipController2;
    private ToolTipControllerShowEventArgs args;

    /// add by Tony 2016/4/5
    this.toolTipController1 = new DevExpress.Utils.ToolTipController();
    this.toolTipController1.AllowHtmlText = true;
    this.toolTipController1.AutoPopDelay = 50000;
    this.toolTipController1.CloseOnClick = DevExpress.Utils.DefaultBoolean.True;
    this.toolTipController1.ShowBeak = true;
    this.toolTipController1.ToolTipLocation = DevExpress.Utils.ToolTipLocation.RightCenter;
    this.toolTipController1.ToolTipStyle = DevExpress.Utils.ToolTipStyle.Windows7;
    this.toolTipController1.ToolTipType = DevExpress.Utils.ToolTipType.SuperTip;
    /// add by Tony 2016/4/6
    this.toolTipController2 = new DevExpress.Utils.ToolTipController();
    this.toolTipController2.AllowHtmlText = true;
    this.toolTipController2.AutoPopDelay = 50000;
    this.toolTipController2.CloseOnClick = DevExpress.Utils.DefaultBoolean.True;
    this.toolTipController2.ShowBeak = true;
    this.toolTipController2.ToolTipLocation = DevExpress.Utils.ToolTipLocation.RightCenter;
    this.toolTipController2.ToolTipStyle = DevExpress.Utils.ToolTipStyle.Windows7;
    this.toolTipController2.ToolTipType = DevExpress.Utils.ToolTipType.SuperTip;

    private void Gantt_OnTimeItemAreaMouseMove(object sender, MouseEventArgs e)
    {
    if (args == null)
    {

    args = CreateShowArgs(sbuText.ToString());
    // 显示ToolTip 这里不可以用控件的坐标.要用屏幕的坐标Control.MousePosition
    toolTipController2.ShowHint(args, System.Windows.Forms.Control.MousePosition);
    }
    }

    public void Gantt_OnTimeItem_Hoover(Gantt aGantt, TimeItemEventArgs e)
    {
    if (e.TimeItem == null)
    {
    toolTipController1.HideHint();
    args = null;
    return;
    }

    if (sbuText.Length > 0)
    {
    // 获取显示ToolTip事件实例
    args = CreateShowArgs(sbuText.ToString());
    // 显示ToolTip 这里不可以用控件的坐标.要用屏幕的坐标Control.MousePosition
    toolTipController1.ShowHint(args, System.Windows.Forms.Control.MousePosition);
    }
    sbuText.Length = 0;
    }

  • 相关阅读:
    Java 正则表达式
    连续子数组最大和
    背包问题
    二叉树的数组存储
    各种鸟
    mac关闭和开启启动声
    关于栈和队列随想
    linux主机名 hostname
    mysql创建新用户并且授权远程访问
    关于linux的用户
  • 原文地址:https://www.cnblogs.com/yt954437595/p/5367384.html
Copyright © 2011-2022 走看看