STTextBox is a pure GDI-drawn WinForm control, which can support transparent colors and Emoji, etc., and can customize the display style of text through the text style monitor.
STTextBox is a WinForm control drawn by me and my friend tpbeldie using GDI.
We adopt the MIT open source license, and the code is built with .Net3.5 + vs2010, so it is compatible with almost all VS versions. Two open source projects were also generated during the design process:
emoji-svg-render, STGraphemeSplitter
Because of our limited capabilities, many functions are not well implemented, so we modified the core functions into independent interfaces, So that other developers can implement it independently without having to find and modify the code in the entire control.
You can use Emoji
in STTextBox
in the demos_bin
we used twemoji.
And for more info, you can see: emoji-svg-render
In STTextBox
all the color you can use alpha
, Of course his efficiency is also very slow. We can't solve it well for now.
You can also customize text styles, by implementing the ITextStyleMonitor
interface, we have four realities built in.
KeyWorldStyleMonitor
CSharpStyleMonitor
LinkStyleMonitor
SelectionStyleMonitor
.
Note: The rendering speed of STTextBox
has nothing to do with the content,
but is related to the number of characters that need to be drawn in the current UI.
For some reasons, we use character-by-character drawing.
In order for the colors to use the Alpha
channel, we don't cache what's being drawn,
since the background may change. And doing caching is also a hassle.
So we have not considered the rendering speed of extreme cases for the time being.
- Github: DebugST
- Blog: Crystal_lz
- Mail: ([email protected])
- TG: DebugST