English 中文(简体)
1.RichTextBox 失去格式
原标题:RichTextBox losing formatting

我试图使一个动态的RichTextBox-采集——用户可以增加几个箱子——洗刷这些盒子,并拯救到行。

第1号案件(一和仅)

  • Pasting RTF data from wordpad document into the RTB-control.
  • 格式应当:

    { tf1ansiansicpg1252deff0deflang1044{fonttbl{f0fnilfcharset0 Times New Roman;}{f1fnilfcharset0 Microsoft Sans Serif;}} viewkind4uc1pardlang20f0fs40 Wattup?lang1044f1fs17par }

  • 检索数据表(数据型分类) 与此类似:

    public Byte[] toByteArray(string str)
    {
        System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
        return encoding.GetBytes(str);
    }
    
  • 利用数据Set——制造新的RichText-Boxes。 与此类似:

    public string fromByteArray(Byte[] bytes)
    {
        System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
        return enc.GetString(bytes);
    }
    
  • Loading from DataSet - applying the data i have saved to the Rtf property of the new RTB. Rtf property is still as it should be.

  • 取代控制——格式化就结束:

    { tf1ansiansicpg1252deff0deflang1044{fonttbl{f0fnilfcharset0 Microsoft Sans Serif;}} viewkind4uc1pardlang20f0fs17 Wattup?lang1044par }

最后,将区域工作队带入控制工作罚款,但将同样的区域工作队数据装入“未卸载”RTB似乎失败。

Would the RichTextBox-control apply some sort of auto-formatting to the RTF if the property is set before the visual loading of the component?

可能有一个简单的解决办法。 任何想法?

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签