Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hilight text in webbrowser that meets a criteria...

Status
Not open for further replies.

lidds

Programmer
Jun 9, 2005
72
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top