View unanswered posts | View active topics It is currently 2019-09-16 14:55



This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
 link标签两行显示 
Author Message
新手上路

Joined: 2016-10-12 16:57
Posts: 4
Post link标签两行显示
项目需要,拓扑图中线上方显示一部分信息,线下方也同时显示一部分信息,我使用了
\n换行符实现的,但是不符合要求,第二行不能居中,所有想问下有没有显示两行的demo

var link:Link = new Link(pnode,bnode);
link.name = "this is a link\ntest";
link.setStyle(Styles.LINK_LABEL_ROTATABLE, true);
link.setStyle(Styles.LABEL_POSITION,Consts.POSITION_TOP);
link.setStyle(Styles.LINK_TYPE,Consts.LINK_TYPE_FLEXIONAL);
link.setStyle(Styles.LABEL_COLOR,0xFF0000);
link.setStyle(Styles.ARROW_FROM,true);
link.setStyle(Styles.ARROW_TO,true);
box.add(link);


2016-10-24 15:21
Profile
TWaver开发组
User avatar

Joined: 2016-07-01 9:43
Posts: 63
Post Re: link标签两行显示
是不是想要这种效果呢?


Attachments:
link.png
link.png [ 7.84 KiB | Viewed 7273 times ]
2016-10-25 14:31
Profile
初级会员

Joined: 2016-03-15 10:43
Posts: 169
Post Re: link标签两行显示
请参考这个demo


Attachment:
label2.png
label2.png [ 6.07 KiB | Viewed 7271 times ]


Attachment:
linkLabel2.zip [2.13 KiB]
Downloaded 659 times


2016-10-25 16:02
Profile
新手上路

Joined: 2016-10-12 16:57
Posts: 4
Post Re: link标签两行显示
Eileen wrote:
请参考这个demo


Attachment:
label2.png


Attachment:
linkLabel2.zip


非常感谢,就是这样的效果 grin


2016-11-29 11:10
Profile
TWaver开发组
User avatar

Joined: 2014-02-11 8:59
Posts: 575
Post Re: link标签两行显示
:love:


2016-12-05 16:36
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron