We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

VB 5.0 Rich Text Box Command

chem7
chem7 asked
on
Medium Priority
259 Views
Last Modified: 2010-07-27
I want to find a way to display a string (say a single
word) in a rich text box control such that the user can
only interact with it (e.g., select or delete) as a single
unit.

[I have a program that displays various "paragraphs" of information in a rich text box at the click of a command button.  It is my desire to make the headings of these paragraphs (which will be in bold type) uneditable by the end-user.  I anticipate there being an RTF code similar
to \protect, but that will not allow selection of part of
the word.]
Comment
Watch Question

Commented:
Do you mean they click on an option button or they click on a check box and it displays something in a text box?

Author

Commented:
Edited text of question

Commented:
Reply with all the info you want to Todd@Programmer.net and I can help you out and send you a file then you can tell me if that is what you want
olx

Commented:
please send email to olx@hotmail.com explaining what do you need


Author

Commented:
Edited text of question

Author

Commented:
Adjusted points to 100

Author

Commented:
Adjusted points to 210
Commented:
In the properties of textbox there are seltext,selstart and sellength you can use this values to check if user selected one of the headers in keydown event, if it is a header you can set keyascii=0 to cancel any edition by user for selection or place.

Sincerely,
VMPN

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Commented:
I ment keycode not keyascii

Sincerely,
VMPN

Commented:
Sorry,I meant keycode not keyascii

Sincerely,
VMPN

Author

Commented:
  I should be able to implement this in code.  I'm giving
the solution a 'B' (and not an 'A') only because I was hoping
for a more elegant solution.

Commented:
I understand.  If you'll need further assistance regarding this question,you can email me at vmpn@aol.com.

Sincerely,
VMPN
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.