找回密码
 立即注册

QQ登录

只需一步,快速开始

ninja_aya

中级会员

54

主题

197

帖子

561

积分

中级会员

积分
561

活字格认证

ninja_aya
中级会员   /  发表于:2014-11-18 14:38  /   查看:5426  /  回复:6
当从控件中复制一段含有域的文本的时候,黏贴到其他地方,该域也会被黏贴过去,请问下有没有什么办法可以只复制黏贴文字和格式,而不复制域。
第二个问题当我从一份word文档中复制一段内容的时候,黏贴到控件中,此时按cirl+z撤销会报错。
ee the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Exception: 未知格式。
(01-2001)
at TXTextControl.TextControlCore.?()
at TXTextControl.TextControlCore.?(? , Int32 , Int32 , Int32 )
at TXTextControl.ApplicationFieldCollection.GetItem()
at ETUZBSoft.richTextControl.textControl1_InputPositionChanged(Object sender, EventArgs e)
at TXTextControl.TextControl.OnInputPositionChanged(EventArgs e)
at TXTextControl.TextControl.?(Message& )
at TXTextControl.TextControl.WndProc(Message& message)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
ETUZBSoft
Assembly Version: 1.0.0.7
Win32 Version: 1.0.0.7
CodeBase: file:///C:/Program%20Files%20(x86)/%E6%98%93%E5%9C%9F365/%E6%98%93%E5%9C%9F365%E6%8B%9B%E6%A0%87%E6%96%87%E4%BB%B6%E5%88%B6%E4%BD%9C%E5%B7%A5%E5%85%B7/ETUZBSoft.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

6 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2014-11-18 19:49:00
沙发
回复 1楼ninja_aya的帖子

很抱歉,根据当前的描述我还没有办法重现问题,能否请你提供重现问题Demo。我们再进一步调查
回复 使用道具 举报
ninja_aya
中级会员   /  发表于:2014-11-19 11:17:00
板凳
这个问题时不时的,有时候编辑的时候按cirl+z会出错,有时候不会出错。请问第一个问题怎么解决。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-11-19 19:35:00
地板
回复 3楼ninja_aya的帖子

你好,

我理解第一个问题的前几个步骤如下:
1.插入 TextField
2.绑定数据
3.复制 tx 中的文本。

请问需要粘贴到 Word 中还是?
回复 使用道具 举报
ninja_aya
中级会员   /  发表于:2014-11-20 09:53:00
5#
不是,同一个tx文档里面,复制一段里面存在field的文本,黏贴到其他段落时会把field一起复制过去,现只需要复制文本和格式,不想把field一起带过去。
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2014-11-20 17:42:00
6#
回复 5楼ninja_aya的帖子

问题我们已经了解,测试后给您进一步反馈。谢谢
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2014-11-24 16:52:00
7#
回复 5楼ninja_aya的帖子

请问你使用的TextControl.Copy方法进行复制么?这个是对当前的选择部分进行复制。
TextControl.GetClipboardFormats可以返回ClipboardFormat的array。
另外TextControl.Paste方法可以传递ClipboardFormat参数。

语法:
[C#] public void Paste(ClipboardFormat format);

[Visual Basic] Public Sub Paste(ByVal format As ClipboardFormat)

成员:format  
描述:
指定paste的format。必须是一个ClipboardFormat值。
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部