Click here to Skip to main content
15,889,909 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everyone,
Is there a method where i can write an unchanged text, i'm designing a software where there is a console or a command line, and i need to write some text where the user cannot modify (passive).

How can i make some text read only and some other not in the same richtextbox
Thanks in advance,
z3ngew
Posted
Updated 23-May-13 11:47am
v2

1 solution

There is no such feature, to best of my knowledge. The whole control is either read-only or not. RTF is a very old standard, pretty much obsolete, I'm not sure you want to mess with it at all. You have to think of something else. If you explain your ultimate goal, I'm almost sure you can get some good advice.

[EDIT]

So, after some (quite vague) clarification, I can suggest some alternative: this brilliant CodeProject work: A Professional HTML Renderer You Will Use[^].

This is an HTML rendered or forms. It is also based on RTF, but all RTF trickery is hidden from you in the component library. I tested it and find the features wonderful, especially special URI schema for resources.

Now, you understand that you can have part of HTML editable. The simplest case is: you can scatter text input element in the text (you can even style them to make them seamless). Those element will flow with the text, behaving pretty much like text element.

However, I would advice you to think about your design ideas more. I'm not sure if you are inventing a convenient and natural way of entering data. Just think more.

—SA
 
Share this answer
 
v2
Comments
z3ngew 23-May-13 18:04pm    
well, about my goal, since mathematics is the real programming language(in my opinion), and using mathematics you can make the computer speak science (like simulation), i wanted to design a software that represents a math oracle, like matLab, sciLab etc.
Now, if you are familiar with it, you may know that the main form of this program is a scientific calculator but in the form of richtextbox, there is some read only commands in this box, so that's it.

Thanks in advance,
z3ngew
Sergey Alexandrovich Kryukov 23-May-13 18:18pm    
I think your understanding of mathematics is pretty shallow. :-)

RTF is too bad to mess with it. I don't completely understand why do you need a text form for math software. Do you want to have some kind of input form, but with input elements flowing with the text? If so, there is a brilliant alternative developed by one CodeProject member. Give me few seconds to find it...

—SA
Sergey Alexandrovich Kryukov 23-May-13 18:23pm    
...done, please see.
—SA
z3ngew 23-May-13 18:35pm    
thank you very much, this is impressive work, and i will take your advice
z3ngew
Sergey Alexandrovich Kryukov 23-May-13 18:45pm    
Great, and will you accept the answer formally (green button)?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900