Esempio n. 1
0
        public static void SetTips(this ToolStripLabel control, Form tipForm)
        {
            Control   ctl = control.GetCurrentParent().TopLevelControl;
            Rectangle rec = ctl.RectangleToScreen(ctl.Bounds);

            tipForm.Location    = new Point(rec.Right - tipForm.Width - 55, rec.Bottom - tipForm.Height - 50);
            _tipForm            = tipForm;
            control.MouseHover += control_MouseHover;
            control.MouseLeave += control_MouseLeave;
        }
 public static void SetToolStripBoxLabelText(ISynchronizeInvoke syncObject, ToolStripLabel toolStripLabel, string text, Color?textColor)
 {
     if (toolStripLabel.GetCurrentParent().InvokeRequired)
     {
         SetToolStripBoxLabelTextDelegate d = SetToolStripBoxLabelText;
         syncObject.Invoke(d, new object[] { syncObject, toolStripLabel, text, textColor });
     }
     else
     {
         toolStripLabel.Text = text;
         if (textColor != null)
         {
             toolStripLabel.ForeColor = textColor.Value;
         }
     }
 }
Esempio n. 3
0
 private void AsyncText(ToolStripLabel obj, string text)
 {
     obj.GetCurrentParent().Invoke(new Action <string>(n => obj.Text = n), new object[] { text });
 }