protected override void SetDesc(string desc) { if (!string.IsNullOrEmpty(desc)) { panelHelp.Visible = true; ControlToolTip.SetToolTip(lblNumber, desc); ControlToolTip.SetToolTip(panelHelp, desc); } }
/// <summary> /// Populate values from the base palette. /// </summary> /// <param name="common">Reference to common settings.</param> public void PopulateFromBase(KryptonPaletteCommon common) { // Populate only the designated styles common.StateCommon.BackStyle = PaletteBackStyle.ControlClient; common.StateCommon.BorderStyle = PaletteBorderStyle.ControlClient; ControlClient.PopulateFromBase(); common.StateCommon.BackStyle = PaletteBackStyle.ControlAlternate; common.StateCommon.BorderStyle = PaletteBorderStyle.ControlAlternate; ControlAlternate.PopulateFromBase(); common.StateCommon.BackStyle = PaletteBackStyle.ControlGroupBox; common.StateCommon.BorderStyle = PaletteBorderStyle.ControlGroupBox; ControlGroupBox.PopulateFromBase(); common.StateCommon.BackStyle = PaletteBackStyle.ControlToolTip; common.StateCommon.BorderStyle = PaletteBorderStyle.ControlToolTip; ControlToolTip.PopulateFromBase(); common.StateCommon.BackStyle = PaletteBackStyle.ControlRibbon; common.StateCommon.BorderStyle = PaletteBorderStyle.ControlRibbon; ControlRibbon.PopulateFromBase(); common.StateCommon.BackStyle = PaletteBackStyle.ControlRibbonAppMenu; common.StateCommon.BorderStyle = PaletteBorderStyle.ControlRibbonAppMenu; ControlRibbonAppMenu.PopulateFromBase(); }
private void panelHelp_Click(object sender, EventArgs e) { ControlToolTip.Show(this.Desc, panelHelp); }
internal void UpdateTooltip(StatusBarPanel panel) { if (tooltips == null) { if (IsHandleCreated && !DesignMode) { //This shouldn't happen: tooltips should've already been set. The best we can //do here is reset it. tooltips = new ControlToolTip(this); } else { return; } } if (panel.Parent == this && panel.ToolTipText.Length > 0) { int border = SystemInformation.Border3DSize.Width; ControlToolTip.Tool t = tooltips.GetTool(panel); if (t == null) { t = new ControlToolTip.Tool(); } t.text = panel.ToolTipText; t.rect = new Rectangle(panel.Right-panel.Width + border, 0, panel.Width - border, Height); tooltips.SetTool(panel, t); } else { tooltips.SetTool(panel, null); } }
/// <include file='doc\StatusBar.uex' path='docs/doc[@for="StatusBar.OnHandleDestroyed"]/*' /> /// <devdoc> /// <para> /// Raises the <see cref='System.Windows.Forms.StatusBar.OnHandleDestroyed'/> event. /// </para> /// </devdoc> protected override void OnHandleDestroyed(EventArgs e) { base.OnHandleDestroyed(e); if (tooltips != null) { tooltips.Dispose(); tooltips = null; } }
/// <include file='doc\StatusBar.uex' path='docs/doc[@for="StatusBar.OnHandleCreated"]/*' /> /// <devdoc> /// <para> /// Raises the <see cref='System.Windows.Forms.Control.CreateHandle'/> /// event. /// </para> /// </devdoc> protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (!DesignMode) { tooltips = new ControlToolTip(this); } if (!this.showPanels) { SendMessage(NativeMethods.SB_SIMPLE, 1, 0); SetSimpleText(simpleText); } else { ForcePanelUpdate(); } }
internal ToolTipNativeWindow(ControlToolTip control) { this.control = control; }
internal void UpdateTooltip(StatusBarPanel panel) { if (this.tooltips == null) { if (!base.IsHandleCreated || base.DesignMode) { return; } this.tooltips = new ControlToolTip(this); } if ((panel.Parent == this) && (panel.ToolTipText.Length > 0)) { int width = SystemInformation.Border3DSize.Width; ControlToolTip.Tool tool = this.tooltips.GetTool(panel); if (tool == null) { tool = new ControlToolTip.Tool(); } tool.text = panel.ToolTipText; tool.rect = new Rectangle((panel.Right - panel.Width) + width, 0, panel.Width - width, base.Height); this.tooltips.SetTool(panel, tool); } else { this.tooltips.SetTool(panel, null); } }
protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (!base.DesignMode) { this.tooltips = new ControlToolTip(this); } if (!this.showPanels) { base.SendMessage(0x409, 1, 0); this.SetSimpleText(this.simpleText); } else { this.ForcePanelUpdate(); } }