2012-11-08 1 views
16

내 C# 응용 프로그램에는 간단한 텍스트 상자와 richtext 상자가있는 눈금이 포함되어 있습니다. richtext 상자에는 다른 곳에서 복사하여 붙여 넣은 서식있는 텍스트가 포함되어 있으며 종종 rtf 마크 업에는 하드 코드 된 글꼴 크기 (\ fsXX, XX의 반점)가 포함됩니다. 대부분의 경우 서식있는 텍스트 글꼴 크기는 단순한 텍스트 글꼴 크기와 비슷하거나 거의 비슷합니다. DPI를 스케일링 96 서식있는 텍스트가로 왜곡되는 기본 이외의 다른 설정높은 DPI 설정에서 RichTextBox 글꼴 크기 조정

은 다음과 같습니다

A) 응용 프로그램이 서식있는 텍스트는 간단한 텍스트보다 작게 표시됩니다 DPI 인식로 설정되어 있지 않은 경우 흐릿 해.

b) 응용 프로그램이 DPI 인식으로 설정된 경우 서식있는 텍스트가 단순 텍스트보다 큽니다.

마크 업을 직접 편집하지 않고 간단한 텍스트로 확장 텍스트를 허용하거나 강요 할 수있는 방법이 있습니까?

+0

richtextbox v5를 사용해 보셨습니까? – Jerry

+0

일부 스크린 샷을 추가 할 수 있습니까? 그것은 쉽게 당신을 도울 수 있습니다 ... –

+0

간단한 텍스트 상자에 정의 된 글꼴은 어떻게 포인트 크기 또는 픽셀입니까? –

답변

-1

다음을 시도하십시오. .NET Framework 4.5.2 이상에서만 지원됩니다. Microsoft는 HighDpiAutoresizing에 대한 몇 가지 컨트롤을 추가로 다루었습니다.

<appSettings> 
    <add key="EnableWindowsFormsHighDpiAutoResizing" value="true" /> 
</appSettings> 
+0

이 기능은 4.5.1에서 도입되었으며 여전히 4.6.1 버전까지 Richtextbox를 크기 조절할 수 없습니다. 자세한 내용은 https://msdn.microsoft.com/en-us/library/ms171868%28v=vs.110%29.aspx –

0

봅니다 사실에 해당 속성 단어 잘림을 설정합니다. 그렇게하지 않도록 문제를 해결할 수

0

한 가지 폼에를 RichTextBox를 설정하고 어쩌면 당신은 WPF의 양식을 사용할 수 있습니다 None (AutoScaleMode Enumeration 문서)

0

폼의 AutoScaleMode 속성을 설정하는 것입니다 다른 화면의 DPI에 대해 걱정해야합니다.

1
<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> 
+0

tinymce 3 파티 도구 다운로드 –