Hi,
I'm trying to add a twitter style #-tagging feature to a Winforms RadRichTextBox, where, when the user enters "#", my code must automatically detect it, and convert the entered text to a link when the user ends the word, by entering a periode/comma/semicolon, a Space a line feed or switches caret position away from the entered word.
I would also like to add support for a popup menu/list, which displays the best matches to what the user have entered, based on previously used #-tags. The user can then select a tag from the popup list and have it inserted as a #-tag link, or continue typing, if none of the displayed #-tags are valid.
Checking the caret position and getting when the user enters "#" is easy enough, but detecting when the user then enters a " " to get the tag, I can't get that to work. I've also tried some popup context menu for displaying the list of available at the current caret position, but that opens with focus, so if the user keeps typing, the typing is ignored.
I really need some pointers and samples to get me in the right direction, so any help is much appriciated.
Best regards,
Thomas
I'm trying to add a twitter style #-tagging feature to a Winforms RadRichTextBox, where, when the user enters "#", my code must automatically detect it, and convert the entered text to a link when the user ends the word, by entering a periode/comma/semicolon, a Space a line feed or switches caret position away from the entered word.
I would also like to add support for a popup menu/list, which displays the best matches to what the user have entered, based on previously used #-tags. The user can then select a tag from the popup list and have it inserted as a #-tag link, or continue typing, if none of the displayed #-tags are valid.
Checking the caret position and getting when the user enters "#" is easy enough, but detecting when the user then enters a " " to get the tag, I can't get that to work. I've also tried some popup context menu for displaying the list of available at the current caret position, but that opens with focus, so if the user keeps typing, the typing is ignored.
I really need some pointers and samples to get me in the right direction, so any help is much appriciated.
Best regards,
Thomas