Hilight text in webbrowser that meets a criteria...

lidds

Well-known member
Joined
Oct 19, 2004
Messages
122
Programming Experience
Beginner
This may or maynot be possible, but thought I would ask the question anyway.

I have a webbrowser control on a form that I am using to allow my users to create custom email templates within my application. I then have a number of button on the form that enters predefined tags within the webbrowser that then I replace with valid data before sending the email. I will give you an example which will probably clarify it better, I have a button that inserts the users name into the webbrowser e.g. it add text [USER_FIRST_NAME] this then allows me to replace [USER_FIRST_NAME] with the actual users first name who sends the email. Therefore making this email templates.

The problem that the user when designing the email templates could click on the [USER_FIRST_NAME] tag text and edit each character. What I would like is when the user clicks in the webbrowser it somehow checks to see if the cursor is within a tag e.g. within the [ and ] and then hilights the whole tag. This would therefore not allow then to edit the content of the tag text.

I hope that makes sense? There are no spaces in my tags, all spaces have _ (underbars)

Thanks in advance

Simon
 
Back
Top