我的C#应用程序包含带有简单文本框和富文本框的网格。富文本框通常包含从其他地方复制和粘贴的富文本,并且rtf标记通常包括硬编码字体大小(\fsXX,XX以半点为单位)。在大多数情况下,富文本字体大小与简单文本字体大小相同或接近。
当DPI缩放设置为默认值96以外的任何值时,富文本会扭曲如下:
a)当应用程序未设置为DPI感知时,富文本显示得比简单文本小,并且是模糊的。
b)当应用程序被设置为DPI感知时,富文本比简单文本大。
除了直接编辑标记之外,是否有一种方法可以允许或强制富文本与简单文本一起缩放?
发布于 2015-02-04 20:09:53
尝试将其属性WordWrap设置为true。
发布于 2015-05-02 00:23:37
解决此问题的一种方法是在窗体上设置RichTextBox,并将窗体的AutoScaleMode属性设置为None (AutoScaleMode Enumeration
发布于 2017-09-03 12:00:55
<script type="text/javascript">
tinyMCE.init({
mode: "textareas",
theme: "advanced",
plugins: "safari,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,imagemanager,filemanager",
theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: false,
template_external_list_url: "js/template_list.js",
external_link_list_url: "js/link_list.js",
external_image_list_url: "js/image_list.js",
media_external_list_url: "js/media_list.js"
});
</script>
<td class="textboxmain" style="height:300px; "><asp:TextBox id="textbox1" TextMode="MultiLine" Height="100%" runat="server" placeholder="test............"></asp:TextBox></td>https://stackoverflow.com/questions/13297050
复制相似问题