【问题标题】:Tabris Button HeightTabris 纽扣高度
【发布时间】:2023-03-14 07:49:02
【问题描述】:

我正在尝试制作多行按钮,但文本被截断。

Button button = new Button( containerButton, SWT.PUSH );
button.setText( "Hello\nWorld" );

是否可以调整按钮的高度? 我发现的唯一东西是 setSize( width, height ) 但这不起作用。

谢谢! 托比

【问题讨论】:

    标签: button multiline tabris


    【解决方案1】:

    尝试为按钮提供布局数据,例如一个网格数据。在这里你可以设置例如高度提示。这应该有效。

    也许一篇值得阅读的好文章是: http://www.eclipse.org/articles/article.php?file=Article-Understanding-Layouts/index.html

    【讨论】:

      猜你喜欢
      • 2012-12-01
      • 2019-10-08
      • 2020-08-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-13
      相关资源
      最近更新 更多