richtextbox中的被动文本 [英] passive text in richtextbox

查看:65
本文介绍了richtextbox中的被动文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

有没有一种方法可以写一个未更改的文本,我正在设计一个有控制台或命令行的软件,我需要写一些文字用户无法修改的地方(被动)。



我怎样才能使一些文本只读,而另一些则不在同一个richtextbox中

谢谢提前,

z3ngew

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

推荐答案

据我所知,没有这样的功能。整个控件是只读的或不是。 RTF是一个非常古老的标准,几乎已经过时了,我不确定你是否想要搞砸它。你必须想到别的东西。如果你解释了你的最终目标,我几乎可以肯定你会得到一些好的建议。







因此,经过一些(相当含糊的)澄清之后,我可以提出一些替代方案:这个精彩的CodeProject工作:您将使用的专业HTML渲染器 [ ^ ]。



这是一个HTML渲染或表格。它也基于RTF,但在组件库中隐藏了所有RTF技巧。我测试了它并发现了很棒的功能,特别是资源的特殊URI模式。



现在,您了解到可以编辑部分HTML。最简单的情况是:您可以在文本中分散文本输入元素(您甚至可以设置它们的样式以使它们无缝)。这些元素将与文本一起流动,表现非常像文本元素。



但是,我建议您更多地考虑您的设计理念。我不确定你是否在发明一种方便自然的数据输入方式。试想更多。



-SA
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.



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


这篇关于richtextbox中的被动文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆