Closed BootBlock closed 3 years ago
In fact, use the existing Graphics.DrawString
method if UseCompatibleTextRendering
is true
, otherwise use the new TextRenderer
class.
The way .NET implements UseCompatibleTextRendering
seems less-than-concrete and kinda bodgey.
Either way, added a standalone UseCompatibleTextRendering
property to VerticalTabControl
which dictates whether text is drawn using TextRenderer.DrawText
(the default of false
) or Graphics.DrawString
(true
).
VerticalTabControl
is currently usingGraphics.DrawString
which, while providing opacity, is outdated and isn't as fast asTextRenderer
.The reason for
DrawString
may be historical or may be due to allowing "disabled" states to be better represented by simply increasing the opacity of the text; if the latter, then some automatic colour lightening/darkening will be required - this won't work if there is more than just a solid background behind the text but it's unlikely to be an issue as these are just tab labels, after all.