ToggleButton
ユーザーがそれを押すと何が起こるかを説明するために、ツールチップを追加しようとしています。問題は、私の説明が長すぎて、ツールチップが「...」で切り捨てられていることです (省略記号文字列でしたか?) とにかく、TooltipBuilder
この例のように最大/優先幅を設定すると:
this.watched = new ToggleButton("Watched?");
Tooltip tooltip = TooltipBuilder.create().wrapText(true).text(
"Rather than specifying individual images, you can make this source \'watched\',which means that every" +
" time this gallery is viewed, all the images in this directory will be listed.").build();
tooltip.prefWidth(50);
watched.setTooltip(tooltip);
私はこの結果を得ます:
maxWidth(double)
、maxWidthProperty().set(double)
、prefWidth(double)
、およびを介して幅を設定しようとしてprefWidthProperty().set(double)
も無視されました。
これを克服する方法はありますか?