如何才能获得两个TextFrame相互点击后的坐标位置?
模板有两个TextFrame命名为txtFrameA和txtFrameB,程序加载时第一次点击txtFrameA或从空白处点击一下鼠标再点击txtFrameA,textControl1.TextChars值不为空;如果是点击txtFrameA后再点击txtFrameB时则textControl1.TextChars的值为空,就无法获得TextFrame的坐标位置,如何才能获得两个TextFrame相互点击后的坐标位置?private void textControl1_TextFrameClicked(object sender, TextFrameEventArgs e)
{
if (textControl1.TextChars == null)
{
throw new Exception("Text position doesn't exist");
}
else
{
Rectangle rectAnchorOffset = textControl1.TextChars.Bounds;
//取得TextFrame坐标位置
}
} 回复 1楼mindrayguowei的帖子
感谢你的反馈。
TextFrame本身就提供了Location属性,可以获取TextFrame的位置。
但是如果textframe设置了horizontal的对齐或是它插入到一个inline,这个属性的返回值是0.
因此这个属性并不能给插入到inline的Text frame设置。 这个问题已经有另外一种方式取得位置,请关闭,谢谢! 方便把您的实现方法共享出来吗?我们会提供100~1000的GCDN金币奖励。 回复 3楼mindrayguowei的帖子
为了给你提供更优质的服务,请对本次服务进行评分。我们会认真对待你提出的宝贵意见,谢谢
http://gcdn.gcpowertools.com.cn/attachment.aspx?attachmentid=10062
页:
[1]