• 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;
    }

  • 相关阅读:
    基于XMPP的即时通信系统的建立 — XMPP IQ详解
    XMPPManager 解析
    Xcode 工程文件“.xcodeproj”文件夹解析
    Description &&debugDescription && runtime(debug模式下调试model)
    day04作业
    数字、字符串、列表、字典,jieba库,wordcloud词云
    if,for,异常,random模块,计算圆周率
    day03
    day02
    计算机基础
  • 原文地址:https://www.cnblogs.com/yt954437595/p/5367384.html
Copyright © 2020-2023  润新知