This PR fixes some bugs, and adds some nice-to-have features#282
This PR fixes some bugs, and adds some nice-to-have features#282PeteJobi wants to merge 13 commits intoPavelTorgashov:masterfrom
Conversation
PeteJobi
commented
Mar 16, 2026
- Double-click + drag can now select multiple words, just like it works in notepad. Thanks to this stackoverflow answer.
- If AllowSeveralTextStyleDrawing is true, applying a style to characters will stack over whatever style was there before (as intended by original author), but if false, applying a style will override whatever style was there before. This fixes styling bugs I encountered.
- The auto-complete menu can now wrap around when navigating i.e if you press down when you're on the last item, you go to the first item. If you press up when you're on the first item, you go to last item.
- You can now set ToolTipDuration to 0 to show a tooltip indefinitely.
- You can choose to use a solid brush for the selected auto-complete item instead of the default gradient brush.
- You can remove the spacing for icons in the auto-complete menu by setting NoSpacingForIcons to true.
- If you want the auto-complete menu to show up again automatically after the user selects an item, set ReShowMenuAfterSelected to true.
- Fixed bug where tooltip shows up for items that don't have tooltips specified.
- If AutoWidth is set to true, the auto-complete menu will automatically resize its width to fit the items. Use AutoWidthExtraPadding to put some spacing between the right edge of the menu and the widest item. If any tooltip is shown while the menu resizes, it is reshown to adjust its position.
- Fixed bug with MaxToolTipSize. Before now, the MaxToolTipSize actually sets the width and height of the tooltip, even when the tooltip size is smaller than MaxToolTipSize. Now, MaxToolTipSize only limits the size of the tooltip when it would otherwise exceed it, and the tooltip text wraps around as expected.
…ike it works in notepad. Thanks to https://stackoverflow.com/a/25708621/5920922
…rs will stack over whatever style was there before, but if false, applying a style will override whatever style was there before
… press down when you're on the last item, you go to the first item. If you press up when you're on the first item, you go to last item
…em instead of the default gradient colour
…ting NoSpacingForIcons to true
…lects an item, set ReShowMenuAfterSelected to true
…y resize its width to fit the items. Use AutoWidthExtraPadding to put some spacing between the right edge of the menu and the widest item. If any tooltip is shown while the menu resizes, it is reshown to adjust its position
…y sets the width and height of the tooltip, even when the tooltip size is smaller than MaxToolTipSize. Now, MaxToolTipSize only limits the size of the tooltip when it would otherwise exceed it, and the tooltip text wraps around as expected
This fork fixes various bugs and enhances features in the original FastColoredTextBox component, including improved selection, styling, auto-complete behavior, and tooltip management.
|
There is quite a lot to review here, you'll have to give me some time to go through everything, and we may break it up into separate PRs depending on what features we want. Thanks for your contribution! |
|
It's indeed a lot. In retrospect, I should have made separate PRs for each fix/feature. |
|
@PeteJobi Would you be able to provide a link to your project that consumes this component? I'm planning on putting a link to all project consumers in the README to show all the cool stuff people have done with Pavel's tool! |
|
Sure! The project is Regexer, a find-and-replace tool. I use the component to highlight matches and the custom pattern syntax. Also for auto-complete menu. |
|
Super cool, Im always curious to see how other people used this control, thanks for providing the link, I'll hopefully have the README updated this weekend. |