Beispiel #1
0
        protected virtual void CreateKeyTipCanvas()
        {
            if (m_KeyTipsCanvas != null)
            {
                m_KeyTipsCanvas.BringToFront();
                if(m_KeyTipsCanvas.Parent!=null)
                    m_KeyTipsCanvas.Parent.Invalidate(m_KeyTipsCanvas.Bounds);
                return;
            }

            m_KeyTipsCanvas = new KeyTipsCanvasControl(this);
            m_KeyTipsCanvas.Bounds = GetKeyTipCanvasBounds();
            m_KeyTipsCanvas.Visible = true;

            RibbonControl rc = this.GetRibbonControl();
            if (rc != null)
            {
                if (rc.Expanded && !NeedsTopLevelKeyTipCanvasParent)
                {
                    rc.Controls.Add(m_KeyTipsCanvas); 
                }
                else
                {
                    Form f = rc.FindForm();
                    if (f != null)
                        f.Controls.Add(m_KeyTipsCanvas);
                    else
                        rc.Controls.Add(m_KeyTipsCanvas); 
                }
            }
            else
                this.Controls.Add(m_KeyTipsCanvas);
            m_KeyTipsCanvas.BringToFront();
        }
Beispiel #2
0
 protected virtual void DestroyKeyTipCanvas()
 {
     if (m_KeyTipsCanvas == null)
         return;
     m_KeyTipsCanvas.Visible = false;
     if (m_KeyTipsCanvas.Parent != null) m_KeyTipsCanvas.Parent.Controls.Remove(m_KeyTipsCanvas);
     m_KeyTipsCanvas.Dispose();
     m_KeyTipsCanvas = null;
 }
Beispiel #3
0
        protected virtual void CreateKeyTipCanvas()
        {
            if (m_KeyTipsCanvas != null)
            {
                m_KeyTipsCanvas.BringToFront();
                return;
            }

            m_KeyTipsCanvas = new KeyTipsCanvasControl(this);
            m_KeyTipsCanvas.Bounds = new Rectangle(0, 0, this.Width, this.Height);
            m_KeyTipsCanvas.Visible = true;
            this.Controls.Add(m_KeyTipsCanvas);
            m_KeyTipsCanvas.BringToFront();
        }