开发者

Re-aligning text in Eclipse Draw2D Label

开发者 https://www.devze.com 2022-12-21 02:19 出处:网络
I am buildin开发者_StackOverflow社区g an RCP-based application with Draw2D Labels (Figures with text).When my graphical editor re-sizes the label, the text stays in it\'s initial position.Is there any

I am buildin开发者_StackOverflow社区g an RCP-based application with Draw2D Labels (Figures with text). When my graphical editor re-sizes the label, the text stays in it's initial position. Is there anyway to have the text reposition based on the new constraints of the label?


It turns out you just need to use the setConstriants(IFigure parent, Rectangle bounds) method to set the bounds of the label that is residing on top of the parent figure.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号