private void DestroyTooltip() { if (m_Tooltip == null) return; m_Tooltip.Hide(); m_Tooltip.Dispose(); m_Tooltip = null; }
private void checkCustomSize_CheckedChanged(object sender, EventArgs e) { customWidth.Enabled = checkCustomSize.Checked; customHeight.Enabled = checkCustomSize.Checked; if (checkCustomSize.Checked) { SuperTooltipInfo info = new SuperTooltipInfo(); UpdateSuperTooltipInfo(info); SuperTooltipControl c = new SuperTooltipControl(); c.UpdateWithSuperTooltipInfo(info); c.RecalcSize(); customWidth.Value = c.Width; customHeight.Value = c.Height; c.Dispose(); } }
private void label2_MouseEnter(object sender, EventArgs e) { DestroyTooltip(); m_Tooltip = new SuperTooltipControl(); m_Tooltip.AntiAlias = false; SuperTooltipInfo info = new SuperTooltipInfo(); info.HeaderText = "Markup tags available"; info.BodyText = "<b>b</b> - Bold <br/>" + "<b>i</b> - Italic <br/>" + "<b>u</b> - Underline <br/>" + "<b>p</b> - Paragraph container, <b>width</b> attribute indicates width of block element <br/>" + "<b>div</b> - Block-level container, <b>width</b> attribute indicates width of block element<br/>" + "<b>span</b> - Inline container, <b>width</b> attribute indicates width of block element. Can be used to create tables<br/>" + "<b>br</b> - Line break<br/>" + "<b>font</b> - Changes font, color, size. <b>size</b> attribute indicates absolute or relative font size. <b>color</b> attribute to change the color" + "You can use relative sizing for example +1 to increase font size by one point or -1 to decrease by one point. <b>face</b> attribute can be employed to set the specific font name to use.<br/>" + "<b>h1</b> - Header markup. You can use h1, h2, h3, h4, h5, h6 to represent header sizes<br/>" + "<b>a</b> - Denotes hypertext link. <b>href</b> and <b>name</b> attributes are supported<br/>" + "<b>expand</b> - Displays the expand part of the button" + "<br/>All tags must be lower case and they must be well formed i.e. each tag must be closed with end tag or be an empty tag."; info.Color = eTooltipColor.Default; Point p = label2.PointToScreen(new Point(0, label2.Height + 1)); m_Tooltip.ShowTooltip(info, p.X, p.Y, true); }
private void panelEx5_MouseEnter(object sender, EventArgs e) { DestroyTooltip(); m_Tooltip = new SuperTooltipControl(); if (m_DefaultFont != null) m_Tooltip.Font = m_DefaultFont; if (m_ParentSuperTooltip != null) { m_Tooltip.MaximumWidth = m_ParentSuperTooltip.MaximumWidth; m_Tooltip.MinimumTooltipSize = m_ParentSuperTooltip.MinimumTooltipSize; m_Tooltip.AntiAlias = m_ParentSuperTooltip.AntiAlias; if (m_ParentSuperTooltip.DefaultFont != null) m_Tooltip.Font = m_ParentSuperTooltip.DefaultFont; } else m_Tooltip.MaximumWidth = MaximumWidth; SuperTooltipInfo info=new SuperTooltipInfo(); UpdateSuperTooltipInfo(info); Point p = panelEx5.PointToScreen(new Point(0, panelEx5.Height + 1)); m_Tooltip.ShowTooltip(info, p.X, p.Y, true); }