C
C#3y ago
Anton

❔ Winforms rotated text in `ToolStripButton` appears bold

When setting the direction of text to e.g. Vertical270, the text in the button becomes different, either bold or lower quality, I'm not sure. How do I fix this?
7 Replies
plam
plam3y ago
Have you tried rendering the specific text on a button via its popup event?
Anton
AntonOP3y ago
no idea what you're talking about
plam
plam3y ago
void tooltip_Popup(object sender, PopupEventArgs e)
{
e.ToolTipSize = TextRenderer.MeasureText(toolTipText, new Font("Courier New", 10.0f, FontStyle.Bold )); // !
e.ToolTipSize = new Size(e.ToolTipSize.Width + TOOLTIP_XOFFSET, e.ToolTipSize.Height + TOOLTIP_YOFFSET);
}
void tooltip_Popup(object sender, PopupEventArgs e)
{
e.ToolTipSize = TextRenderer.MeasureText(toolTipText, new Font("Courier New", 10.0f, FontStyle.Bold )); // !
e.ToolTipSize = new Size(e.ToolTipSize.Width + TOOLTIP_XOFFSET, e.ToolTipSize.Height + TOOLTIP_YOFFSET);
}
Anton
AntonOP3y ago
Not tool tip, tool strip
plam
plam3y ago
It's got the property as well.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server