richtext

DevExpress v18.1新版亮点——WinForms篇(六)

为君一笑 提交于 2019-11-27 13:55:37
用户界面套包DevExpress v18.1日前终于正式发布,本站将以连载的形式为大家介绍各版本新增内容。本文将介绍了DevExpress WinForms v18.1 的新功能,快来下载试用新版本! 点击下载>> Rich Text Editor Microsoft Word Inspired Formatting and Layout 新版本投入了大量的资源改进用于WinForms、WPF和Word Processing文件API的DevExpress Rich Edit控件呈现文档的方式。在显示、打印和导出文档时,增强了布局和格式的准确性,DPI设置也不再是问题。 Checkbox Form Fields 通过新版本,WinForms和WPF Rich Text Editors可以使用复选框加载文档。 最终用户可以切换复选框状态、保存、打印或导出结果。 其他增强功能 自动文档格式识别 在新版本中,如果文档是通过编程方式从文件或流中加载的,DevExpress RichEditControl将根据其内容自动识别文档的格式。 Print API WinForms RichEditControl现在包含'Print'方法,允许您使用默认或自定义打印机设置打印文档。 Scheduler Control 新的存储机制

Reset RTF in RichTextBox?

感情迁移 提交于 2019-11-27 08:42:34
I'm trying to "reset" the formatting in my RichTextBox (WinForms, not WPF). I was previously using richTextBox.Text = richTextBox.Text; However, that seems to have suddenly failed me. Now no matter what I set richTextBox.Text to, it retains some of the rtf formatting. I've tried richTextBox.Rtf = richTextBox.Text; However, that complains about an incorrect format. There's gotta be a better way to do this. (Of course, selecting the entire thing, then resetting the back color, fore color, and font works, but that results in a flicker as the entire thing is selected then deselected, plus it's

How can I copy from an html file to the clipboard in Python in formatted text?

被刻印的时光 ゝ 提交于 2019-11-27 07:50:43
问题 I'm writting a Word document and I'd like to paste a formatted code-snippets directly from clipboard. At this moment I am able to write these snippets into an .html file to the harddisk. My goal is to extend my Python script and load this .html file on the clipboard in "formatted text" to directly paste at Word. Does anyone knows any way to do this in Python? Thanks in advance. Sherab 回答1: Well, I've found a solution for this. http://code.activestate.com/recipes/474121-getting-html-from-the

ValidateInput(false) vs AllowHtml

守給你的承諾、 提交于 2019-11-27 05:18:31
问题 I have a form that is used to create a memo, to do that I am using a rich text editor to provide some styling, this creates html tags in order to apply style. When I post that text, the mvc throws an error to prevent potentially dangerous scripts, so I have to specifically allow it. I have found 2 ways of doing this, one is to decorate the controller method with [ValidateInput(false)] and the other is to decorate the ViewModel attribute with [AllowHtml] . To me, [AllowHtml] looks much nicer,

javascript Rich Text Editors

瘦欲@ 提交于 2019-11-26 23:59:21
问题 There are several (very good) rich text web editors written in Javascript (eg FCKeditor, YUI Texteditor and many many others). However I couldn't find any tutorial on how to build such a component. Something that would explain both high-level considerations (architecture) and/or more details in low-level "critical" points (ie why do most of the editors out there use iFrame, how do you handle keyboard input like Ctrl-B, Ctrl-C when the text is selected and when it is not etc) My main

Sending formatted Lotus Notes rich text email from Excel VBA

大憨熊 提交于 2019-11-26 19:02:44
I have little Lotus Script or Notes/Domino knowledge but I have a procedure, copied from somewhere a long time ago, that allows me to email through Notes from VBA. I normally only use this for internal notifications where the formatting hasn't really mattered. I now want to use this to send external emails to a client, and corporate types would rather the email complied with our style guide (a sans-serif typeface basically). I was about to tell them that the code only works with plain text, but then I noticed that the routine does reference some sort of CREATERICHTEXTITEM object. Does this

Reset RTF in RichTextBox?

瘦欲@ 提交于 2019-11-26 14:08:12
问题 I'm trying to "reset" the formatting in my RichTextBox (WinForms, not WPF). I was previously using richTextBox.Text = richTextBox.Text; However, that seems to have suddenly failed me. Now no matter what I set richTextBox.Text to, it retains some of the rtf formatting. I've tried richTextBox.Rtf = richTextBox.Text; However, that complains about an incorrect format. There's gotta be a better way to do this. (Of course, selecting the entire thing, then resetting the back color, fore color, and

How to make item view render rich (html) text in Qt

眉间皱痕 提交于 2019-11-26 11:44:52
Suppose my model has items with the following string for Qt::DisplayRole <span>blah-blah <b>some text</b> other blah</span> I want QTreeView (actually, any item view) to render it like a rich text. Instead, item views render it like a pure text by default. How to achieve the desired rendering? Actually, this is a search results model. User enters a text, some document is searched against that text and the user is presented with search results, where the words being searched should be bolder than surrounding text. serge_gubenko I guess you can use setItemDelegate method of the treeview to setup

How do I convert HTML to RTF (Rich Text) in .NET without paying for a component?

谁说胖子不能爱 提交于 2019-11-26 07:25:39
问题 Is there a free third-party or .NET class that will convert HTML to RTF (for use in a rich-text enabled Windows Forms control)? The \"free\" requirement comes from the fact that I\'m only working on a prototype and can just load the BrowserControl and just render HTML if need be (even if it is slow) and that Developer Express is going to be releasing their own such control soon-ish. I don\'t want to learn to write RTF by hand, and I already know HTML, so I figure this is the quickest way to

Sending formatted Lotus Notes rich text email from Excel VBA

蓝咒 提交于 2019-11-26 06:45:02
问题 I have little Lotus Script or Notes/Domino knowledge but I have a procedure, copied from somewhere a long time ago, that allows me to email through Notes from VBA. I normally only use this for internal notifications where the formatting hasn\'t really mattered. I now want to use this to send external emails to a client, and corporate types would rather the email complied with our style guide (a sans-serif typeface basically). I was about to tell them that the code only works with plain text,